Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

third party model support for genesis command #173

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

phact
Copy link

@phact phact commented Sep 26, 2024

Addresses #160

Usage example (for claude but usage is similar for other providers):

ANTHROPIC_API_KEY=<key goes here> agency-swarm genesis --model claude-3-5-sonnet-20240620

Or set your creds in .env

Copy link
Collaborator

@bonk1t bonk1t left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job! Left minor comments.

agency_swarm/agents/agent.py Outdated Show resolved Hide resolved
requirements.txt Show resolved Hide resolved
@rhessing
Copy link

rhessing commented Nov 11, 2024

I believe astra-assistants requires an API key to be operational:
export ASTRA_DB_APPLICATION_TOKEN=""

And/Or (not sure either both or one of the other) you will need to host your own astra-assistants API server locally and point the python client to that server:
export base_url="http://localhost:8080/v1"

@phact ? Not sure if I've read the code correctly but these changes should also allow for:

from agency_swarm import Agent

ceo = Agent(name="CEO",
            description="Responsible for client communication, task planning and management.",
            instructions="You must converse with other agents to ensure complete task execution.", # can be a file like ./instructions.md
            files_folder="./files", # files to be uploaded to OpenAI
            schemas_folder="./schemas", # OpenAPI schemas to be converted into tools
            tools=[MyCustomTool], 
            model="claude-3-5-sonnet-20240620"
            temperature=0.5, # temperature for the agent
            max_prompt_tokens=25000, # max tokens in conversation history
            )

@phact
Copy link
Author

phact commented Nov 12, 2024

@rhessing correct, if you choose a non-openai model (like model="claude-3-5-sonnet-20240620" in your example) then you'll also need to pass an ASTRA_DB_APPLICATION_TOKEN env var.

And yes, you can optionally host astra-assistants yourself and pass BASE_URL env var.

@phact phact requested a review from bonk1t November 12, 2024 19:51
@bonk1t
Copy link
Collaborator

bonk1t commented Nov 13, 2024

Thank you, @phact! I’ll merge this as soon as I test it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants