Create chat gpt agent

From UBot Studio
Revision as of 19:43, 30 June 2023 by LillyT (Talk | contribs)

Jump to: navigation, search

The create chat gpt agent command creates a new GPT agent.

When creating a new GPT agent, you can specify the context, model, and agent name. The context sets the tone and behaviour for the agent, while the model specifies the qualitative aspects of how it generates responses.

Parameters

Agent Name: This is the name that you give to the agent. You'll use this name to add messages to the agent's conversation. The default name is "ChatGPT".

Context: (optional) This is the initial conversational context that sets the tone and behaviour for the agent. The default context is "You are a helpful assistant." You can enter any text here that you would like the agent to remember and base its responses on.

Model: The model determines the GPT version utilized to process commands and generate responses. You can choose from gpt-3.5-turbo or gpt-4. The default is gpt-3.5-turbo.

Example

config openai("your api key here")
create chat gpt agent("FoodBot", "You are FoodBot, an AI designed to offer food and nutrition advice.", "gpt-4")
add user message("What should I eat for dinner?", "FoodBot")
alert($chat gpt response("{message from user input}","FoodBot"))

As always, replace "your api key here" with your actual API key.

This script first creates a GPT agent named "FoodBot" who is designed to offer food and nutrition advice, and then adds a user's message inquiring about dinner options. It then generates a response from the food bot to the user's input and alerts the user with the generated response.

Agents can be very useful for setting up specific personas or roles, especially when it comes to consistency and maintaining context over several individual commands.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox