GithubHelp home page GithubHelp logo

stanford-futuredata / frugalgpt Goto Github PK

View Code? Open in Web Editor NEW
147.0 147.0 15.0 260 KB

FrugalGPT: better quality and lower cost for LLM applications

License: Apache License 2.0

Python 60.05% Jupyter Notebook 39.95%

frugalgpt's People

Contributors

lchen001 avatar roh26it avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

frugalgpt's Issues

Finetuning on a chatbot responses dataset

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,

Update Anthropic Client

Anthropic changed their python sdk - making this code line outdated.

self.client = anthropic.Client(os.environ['ANTHROPIC_API_KEY'])


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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.