Open scrollop opened 10 months ago
Hi @sunner I believe I 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:
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)
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)
@ishaan-jaff Your project is interesting. Stared. However, ChatALL is a js project.....
Is your feature request related to a problem? / 你想要的功能和什么问题相关?
Is it possible to add Claude console capability?
I signed up to the claude api a few months ago and use claude via https://console.anthropic.com/chat
Apparently anhropic may limit claude via the claude.ai site in the future, so it would be nice to have the console.anhropic.com access.
Thanks
Describe the solution you'd like. / 你想要的解决方案是什么?
Potentially add.
Describe alternatives you've considered. / 你考虑过的其他方案是什么?
No response
Additional context / 其他信息
No response