Agent

Agents are configurable objects you can have to scale ChatGPT.

To configure an agent, all you need is an OpenAI API key and some basic configuration to make him understand what you want to do.

The usage of an agent can be for interacting with tickets (by getting data to edit tickets) or even as a JSM chat bot, that will consume your information and use as a response.

To invoke an agent

# Base Configuration api_key = "YOUR_OPENAI_API_KEY" agent_name = "Support Bot" # Getting your Agent agent = Agent(api_key, agent_name) # Set his knowledge agent.set_system_instructions("Please provide a response based on the examples.") agent.add_example_output("I'm sorry to hear that. Let me see what I can do to help.") agent.add_example_output("Thank you for reaching out. I'll assist you with this.") agent.add_example_output("Sure, I can help you with that. Let's find a solution together.") # Get your response response = agent.get_response("I'm having trouble accessing my account.")

The base configuration to your agent is

temperature = 0.41 max_tokens = 256 top_p = 1 frequency_penalty = 0.0 presence_penalty = 0.0

To override any of those configurations

agent.temperature = 0.41 agent.max_tokens = 256 agent.top_p = 1 agent.frequency_penalty = 0.0 agent.presence_penalty = 0.0

 

Easy for Jira - Python Automations, 2023