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

Add support for Claude, Anthropic #2164

Closed
iitrsamrat opened this issue Mar 27, 2024 · 6 comments
Closed

Add support for Claude, Anthropic #2164

iitrsamrat opened this issue Mar 27, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@iitrsamrat
Copy link

Describe the bug

[Bug]: Does not work with claude

Steps to reproduce

  1. Use the following config for claude
    [
    {
    "model": "claude-3-opus-20240229",
    "api_key": "",
    "base_url": "https://api.anthropic.com",
    "api_type": "anthropic"
    }

]
2. Run the following code.

`import autogen
from autogen.agentchat.contrib.agent_builder import AgentBuilder

config_file_or_env = "OAI_CONFIG_LIST"
llm_config = {"temperature": 0}
config_list = autogen.config_list_from_json(config_file_or_env, filter_dict={"model": ["claude-3-opus-20240229"]})

def start_task(execution_task: str, agent_list: list):
group_chat = autogen.GroupChat(agents=agent_list, messages=[], max_round=12)
manager = autogen.GroupChatManager(groupchat=group_chat, llm_config={"config_list": config_list, **llm_config})
agent_list[0].initiate_chat(manager, message=execution_task)

builder = AgentBuilder(
config_file_or_env=config_file_or_env, builder_model="claude-3-opus-20240229", agent_model="claude-3-opus-20240229"
)
`

Model Used

claude 3 opus

Expected Behavior

No response

Screenshots and logs

No response

Additional Information

No response

@iitrsamrat iitrsamrat added the bug Something isn't working label Mar 27, 2024
@jackgerrits
Copy link
Member

We do not currently have support for the Anthropic API, we are open to adding support for this though! Any help is appreciated

@jackgerrits jackgerrits added enhancement New feature or request and removed bug Something isn't working labels Mar 28, 2024
@jackgerrits jackgerrits changed the title [Bug]: Does not work with claude Add support for Claude, Anthropic Mar 28, 2024
@jtoy
Copy link
Collaborator

jtoy commented Mar 29, 2024

this looks like a fun feature to build!

@levscaut
Copy link
Collaborator

levscaut commented Apr 1, 2024

Hey I'd like to help. Will draft a PR soon.

@ekzhu
Copy link
Collaborator

ekzhu commented Apr 3, 2024

@ekzhu ekzhu closed this as completed Apr 3, 2024
@levscaut
Copy link
Collaborator

levscaut commented Apr 4, 2024

Thanks @ekzhu @thinkall for the advice! Looking forward to more feedbacks!

@Duncan-Haywood
Copy link
Collaborator

Thanks for the work all.

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

No branches or pull requests

6 participants