Giter Club home page Giter Club logo

auto-gpt-plugin-template's People

Contributors

andrescdo avatar billschumacher avatar buckedunicorn avatar lc0rp avatar ntindle avatar richbeales avatar slistinc avatar taylorbeeston avatar torantulino avatar wladastic avatar zhanglei1172 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

auto-gpt-plugin-template's Issues

improve documentation

Could somebody please improve the documentation?

From what I can gather, a plugin must extend AutoGPTPluginTemplate and set:

  • self._name
  • self._version
  • self._description

It should also implement can_handle_xxxx methods, returning True only if they do something other than pass in xxxx, the options of which are:

post_prompt

This method is called just after the generate_prompt is called, but actually before the prompt is generated.

...why?

This seems to be the only method that any of the existing plugins currently implement.

I can see that they register commands that they can support, presumably this is only called once. I'm not sure how the class registers it self though.

I can see that they define the args that are provided to the function being registered. "imap_search_command": "<imap_search_criteria_command>", seems to break a convention - any reason, or is the string content just arbitrary?

Parameters:

  • prompt: PromptGenerator - okay, this is actually fairly well documented. The prompt is sent to the LLM

on_response

Parameters:

  • response - I guess we're expecting it's as per below?
  • *args - is this {"arg name": "value"} ?
  • *kwargs ...I've got no idea

Return

A string - but what should it look like? Who/what reads it and when/why?
...Is this just a string, as you'd see in a response from ChatGPT?

This method is called when a response is received from the model

response format

        {
          "thoughts": {
                "text": "thought",
                "reasoning": "reasoning",
                "plan": "- short bulleted\n- list that conveys\n- long-term plan",
                "criticism": "constructive self-criticism",
                "speak": "thoughts summary to say to user",
            },
            "command": {"name": "command name", "args": {"arg name": "value"}},
        }

on_planning

This method is called before the planning chat completion is done

...Who is involved in this "planning chat"?
...What are the messages? Are they just {role: "", content: ""}? Can somebody please provide a realistic example?

Parameters

  • prompt: PromptGenerator
  • messages: List[Message]

Returns

Optional string - what/why?

post_planning

This method is called after the planning chat completion is done.

Parameters:

  • response: str

Returns

  • str - what should this be?

pre_instruction

This method is called before the instruction chat is done

Parameters

  • messages (List[Message]): The list of context messages.

...can we get have an example?

Returns

the same messages?

on_instruction

This method is called when the instruction chat is done.

Parameters

  • messages (List[Message]): The list of context messages.

...what do the context messages look like? Are they for humans or the system?

post_instruction

This method is called after the instruction chat is done

Args:
response (str): The response.

    Returns:
        str: The resulting response.

pre_command

This method is called before the command is executed

...some example use cases for some of these would be useful

Args:
command_name (str): The command name.
arguments (Dict[str, Any]): The arguments.

post_command

This method is called after the command is executed.

    Args:
        command_name (str): The command name.
        response (str): The response.

    Returns:
        str: The resulting response.

handle_chat_completion

This method is called when the chat completion is done.

...the whole session or one turn?

  Args:
        messages (List[Message]): The messages.
        model (str): The model name.
        temperature (float): The temperature.
        max_tokens (int): The max tokens.

user_input

This method is called to request user input to the user

  • user_input (str): The question or prompt to ask the user.

returns the user input as a string

report

Generates a report to the user
...what's in the message?

  • mesage: str

Plugin config is invalid, continuing without plugins. Error: Invalid plugin config data type: <class 'list'>

While running docker compose run --rm auto-gpt --install-plugin-deps, the following error appears:

Plugin config is invalid, continuing without plugins. Error: Invalid plugin config data type: <class 'list'>

My plugins_config.yaml file content is:

commercetools:
  - config: {} # Configs from the plugin README and installation instructions.
  - enabled: true

When i remove the hyphen from the plugins_config.yaml file, the error does not appear anymore but the plugin is not loaded

pypi package `auto-gpt-plugin-template` is out of date

The auto-gpt-plugin-template package on pypi is out of date, and seems out of sync with this repo:

  • Repo says version is 0.0.2, latest version on pypi is 0.0.3
  • API in repo constains fixes that the 0.0.3 release on pypi lacks
    • List[Message] in the repo vs List[str] in the package

This causes type errors in the Auto-GPT codebase, because it imports the pypi package rather than the repo:
image

free api

Hi my name is Kepar,
recently i found a chatgpt clone (3.5 turbo) model for free

i leave the code here, tell me if something happens with this, hope i helped the world

import json
import requests

safeInput = input('Request:  ')

# Prepare the data payload
data = {
    "prompt": safeInput
}
payload = json.dumps(data)

# Set the headers
headers = {
    "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0",
    "Accept": "application/json, text/plain, */*",
    "Accept-Language": "en-US,en;q=0.5",
    "Content-Type": "application/json",
    "Origin": "https://chatbot.theb.ai",
    "Referer": "https://chatbot.theb.ai/"
}

# Send the POST request
url = "https://chatbot.theb.ai/api/chat-process"
response = requests.post(url, data=payload, headers=headers)

# Process the response
if response.status_code == 200:
    response_text = response.text

    # Find the last JSON string in the response text
    json_strings = response_text.strip().split('\n')
    last_json_string = json_strings[-1]

    response_json = json.loads(last_json_string)
    print(response_json['text'])
else:
    print("Error:", response.status_code)
    ```
IF SOMEONE CAN MAKE A PLUGIN FOR THIS API, IT COULD BE REALLY APPRECIATED 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.