VRSEN / agency-swarm

The only reliable agent framework built on top of the latest OpenAI Assistants API.
https://vrsen.github.io/agency-swarm/
MIT License
2.05k stars 537 forks source link

Temperature Integration on Agent Creation #111

Closed hicknughes closed 2 months ago

hicknughes commented 2 months ago

Hi there! Temperature can be set with the creation of an agent within OpenAI. It would be great to add that to the Agent class as an input parameter so that individual Agent temperatures can be controlled within the Agency.

Thanks in advance!

VRSEN commented 2 months ago

Hey yeah, there were a lot of updates so I am working on it right now. It's almost done. You can checkout dev/assistants-v2 branch

hicknughes commented 2 months ago

Great! Will that version also allow for the use of a specific agent on a specific thread? I have been using OpenAI's Assistants API to deploy agents on specific threads in an effort to control token cost creep. Is there a better solution that exists or in development within the agency-swarm framework?

VRSEN commented 2 months ago

There are new parameters in the agency and agent classes to control token costs from Assistants V2. Simply set max_prompt_tokens and OpenAI will do the truncating for you. The parameter in the agent class overrides the parameter in the agency, which acts as the default. temperature works the same way. Please install latest and try it out!