Comments (6)
Please explain the way you want to add this Antropic/Claude. Will it be another model backend? Pleas also explain the difference between Anthropic and Claude. Pls do it right in the description of the ticket.
Hi @Obs01ete , Claude series are LLM from a company called Anthropic, which support 100,000 token context windows. They could be another great model backend choice for role-playing agents. I have added more details in this issue
@lightaime Hi, I opened a PR for Anthropic LLM backend. However, it looks like some tests fail for not being able to read the secret variable OPENAI_API_KEY. I check the action log and it is empty:
env: pythonLocation: /opt/hostedtoolcache/Python/3.8.18/x64 LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.18/x64/lib OPENAI_API_KEY:
I think it is because PR does not have access to secrets. See link. Could you help to add a "dump api_key" job in actions to fix it? Since we actually don't need a valid api key.
Could you help to check the OPENAI_API_KEY setup? Due to the dangers inherent to automatic processing of PRs, GitHub’s standard pull_request workflow
trigger by default prevents write permissions and secrets access to the target repository. I think all PRs cannot pass some of the tests due to the lack of OPENAI_API_KEY in the environment.
from camel.
Hi @ocss884. Sounds great. Please feel free to open a PR. Although I do not have access to Claude yet. Here is also a related discussion: #271.
from camel.
@lightaime Hi, I opened a PR for Anthropic LLM backend. However, it looks like some tests fail for not being able to read the secret variable OPENAI_API_KEY. I check the action log and it is empty:
env:
pythonLocation: /opt/hostedtoolcache/Python/3.8.18/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.18/x64/lib
OPENAI_API_KEY:
I think it is because PR does not have access to secrets. See link. Could you help to add a "dump api_key" job in actions to fix it? Since we actually don't need a valid api key.
from camel.
Hey @lightaime,
If you're integrating via litellm, here's an easy way to test if the anthropic integration is working:
https://docs.litellm.ai/docs/proxy_api#step-2-test-a-new-llm
from camel.
Hi @lightaime @ocss884 I believe we can help with this issue. I’m the maintainer of LiteLLM https://github.com/BerriAI/litellm - we allow you to use any LLM as a drop in replacement for gpt-3.5-turbo
.
You can use LiteLLM in the following ways:
With your own API KEY:
This calls the provider API directly
from litellm import completion
import os
## set ENV variables
os.environ["OPENAI_API_KEY"] = "your-key" #
os.environ["COHERE_API_KEY"] = "your-key" #
messages = [{ "content": "Hello, how are you?","role": "user"}]
# openai call
response = completion(model="gpt-3.5-turbo", messages=messages)
# cohere call
response = completion(model="command-nightly", messages=messages)
Using the LiteLLM Proxy with a LiteLLM Key
this is great if you don’t have access to claude but want to use the open source LiteLLM proxy to access claude
from litellm import completion
import os
## set ENV variables
os.environ["OPENAI_API_KEY"] = "sk-litellm-5b46387675a944d2" # [OPTIONAL] replace with your openai key
os.environ["COHERE_API_KEY"] = "sk-litellm-5b46387675a944d2" # [OPTIONAL] replace with your cohere key
messages = [{ "content": "Hello, how are you?","role": "user"}]
# openai call
response = completion(model="gpt-3.5-turbo", messages=messages)
# cohere call
response = completion(model="command-nightly", messages=messages)
from camel.
Please explain the way you want to add this Antropic/Claude. Will it be another model backend? Pleas also explain the difference between Anthropic and Claude. Pls do it right in the description of the ticket.
from camel.
Related Issues (20)
- [Roadmap] RAG(Retrieval-Augmented Generation)
- [Roadmap] Adding `enviroments`
- [Feature Request] Add AgentConfig class
- [Feature Request] Unsafe code execution support HOT 4
- [Feature Request] AI generated code execution request HOT 1
- [BUG] Naming inconsistency of `model` in `ChatAgent` and `model_type` in elsewhere HOT 5
- [Feature Request] Users need the OPENAI_API_BASE_URL for the OPENAI proxy to function optimally HOT 2
- [BUG] AttributeError: 'NoneType' object has no attribute 'content' HOT 1
- Agent conversation question HOT 2
- [BUG] Conflict between"isort" and "yapf" on long import statement
- [Feature Request] Clarify Agent for Multi-agent task specification
- [Feature Request] check_consistency_agent && conflicts_resolving_agent
- [Question] Rename `utils.functions` to `utils.common` HOT 2
- Edmund He
- [Feature Request] Implement `InterCode`
- [Roadmap] Add new OpenAI APIs
- [Feature Request] Integration of Assistant API into Assistant Role within Role-Playing Mode
- [Feature Request] Bump `openai` package to v1.1.0
- [Feature Request] Support `Enum` type in function calling
- [Feature Request] Implementing a Prompt Engineer Review Process based on GPTs for Enhanced Agent Performance
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from camel.