Giter Club home page Giter Club logo

Comments (7)

victordibia avatar victordibia commented on May 23, 2024 6

This is great actually, I'd say this is a clean way to offer support for multiple models via litellm in autogen.
We can guide users to do this by updating the documentation to show how to:

  • Install and run an OAI compliant endpoint (with support for 100s of models) via litellm
  • Show how AutoGen can consume these endpoints seamlessly via the oai_config_list
from autogen import AssistantAgent, UserProxyAgent, oai
config_list=[
    {
        "model": "palm/text-bison",
        "api_base": "http://localhost:8000/v1",  #litellm compatible endpoint
        "api_type": "open_ai",
        "api_key": "NULL", # just a placeholder
    }
]

response = oai.Completion.create(config_list=config_list, prompt="Hi")
print(response) # works fine

assistant = AssistantAgent("assistant")
user_proxy = UserProxyAgent("user_proxy")
user_proxy.initiate_chat(assistant, message="Plot a chart of META and TESLA stock price change YTD.", config_list=config_list)
# fails with the error: openai.error.AuthenticationError: No API key provided.

There is a chance I may have missed something here, happy to get your thoughts

from autogen.

krrishdholakia avatar krrishdholakia commented on May 23, 2024 2

Hey @victordibia thank you for this incredible tutorial. I added it to our docs and gave you credit for it:
https://docs.litellm.ai/docs/proxy_server#tutorial-use-with-aiderautogencontinue-dev
Screenshot 2023-10-07 at 5 53 28 PM

from autogen.

ishaan-jaff avatar ishaan-jaff commented on May 23, 2024 1

@victordibia thanks for taking a look at litelm

Yes the endpoint is OpenAI compatible

What do you want to use it for ? (I want to make sure we can support it well)

from autogen.

sonichi avatar sonichi commented on May 23, 2024

related to #46

from autogen.

qingyun-wu avatar qingyun-wu commented on May 23, 2024

@LeoLjl

from autogen.

ishaan-jaff avatar ishaan-jaff commented on May 23, 2024

made a PR for this: #95

from autogen.

victordibia avatar victordibia commented on May 23, 2024

Quick question @ishaan-jaff.
I have taken a look at litelllm and the list of models supported in the python api is very impressive!

I also see that you can serve any model over a web endpoint.

litellm --model <model_name>

Can you confirm if this end point is OpenAI api compatible, similar to something like what fastchat //vllm provides?

This could be a clean way broaden the list of supported models.

from autogen.

Related Issues (20)

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.