stanford-futuredata / frugalgpt Goto Github PK
View Code? Open in Web Editor NEWFrugalGPT: better quality and lower cost for LLM applications
License: Apache License 2.0
FrugalGPT: better quality and lower cost for LLM applications
License: Apache License 2.0
When I open the Google Colab Notebook Error occurred
Hello, I just wanted to start off and say this is wonderful work!
I am creating a chatbot, and this chatbot dataset is in this form:
messages=[
{
"role": "system",
"content": prompt,
},
{
"role": "assistant",
"content": "AI: Message"
},
{
"role": "user",
"content": "CX: Message"
},
{
"role": "assistant",
"content": "AI: Message"
},
{
"role": "user",
"content": "CX: Message"
},
{
"role": "assistant",
"content": "AI: Message"
},
{
"role": "user",
"content": "CX: Message"
},
{
"role": "assistant",
"content": "AI: Message"
},
{
"role": "user",
"content": "CX: Message"
},
{
"role": "assistant",
"content": "AI: Message"
},
{
"role": "user",
"content": "CX: Message"
},
],
Where it shows a direct conversation clearly between the user and the AI assistant. I have looked at your service/modelservice.py
page and was wondering if the function OpenAIChatModelProvider
is what I would need to change in order to accept my dataset. Currently, it just takes all input as just the users.
Moreover, just wondering if there are some general issues you may see arise from using this dataset.
Cheers,
Anthropic changed their python sdk - making this code line outdated.
FrugalGPT/src/service/modelservice.py
Line 470 in a46f0a6
Would love to know if this might help - https://github.com/BerriAI/litellm
~Simple I/O library, that standardizes all the llm api calls to the OpenAI call
from litellm import completion
## set ENV variables
# ENV variables can be set in .env file, too. Example in .env.example
os.environ["OPENAI_API_KEY"] = "openai key"
os.environ["ANTHROPIC_API_KEY"] = "anthropic key"
messages = [{ "content": "Hello, how are you?","role": "user"}]
# openai call
response = completion(model="gpt-3.5-turbo", messages=messages)
# anthropic call
response = completion("claude-v-2", messages)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.