Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Agents are configurable objects you can have to scale ChatGPT.

To invoke an agent:

# Declare your Agent
agent = Agent('Smith')
agent.set_token('your openai api token')
agent.set_role('AI program in the Matrix')

# Add Instructions
agent.add_instruction('your written instruction 1')
agent.add_instruction('your written instruction 2')

# Provide Knowledge
agent.set_knowledge('any string')

# Ask something to your agent
response = agent.process('any string input')

The base configuration to your agent is:

model = 'gpt-3.5-turbo-16k'
CFG_TEMPERATURE = 0.5
CFG_MAX_TOKENS = 12000
CFG_TOP_P = 0.7
CFG_FREQUENCY_PENALTY = 0.3
CFG_PRESENCE_PENALTY = 0.3

To override any of those configurations, do the following:

agent.model = 'gpt-3.5-turbo-16k'
agent.CFG_TEMPERATURE = 0.5
agent.CFG_MAX_TOKENS = 11000
agent.CFG_TOP_P = 0.5
agent.CFG_FREQUENCY_PENALTY = 0.0
agent.CFG_PRESENCE_PENALTY = 0.0

  • No labels