Giter VIP home page Giter VIP logo

Comments (4)

momegas avatar momegas commented on June 10, 2024

Haven't searched through this specific API. Do I need any special access? Can you point me to some relevant documentation?

from megabots.

timlincool avatar timlincool commented on June 10, 2024

Thank you for your hard work on this project! I was wondering if it's possible to add support for Azure OpenAI API. I noticed that Auto-GPT supports Azure API, which might be a helpful reference for implementation. Here's the GitHub repository link for Auto-GPT: https://github.com/Significant-Gravitas/Auto-GPT

I hope this feature can be considered, and I'm looking forward to seeing the project grow. Thank you!

from megabots.

momegas avatar momegas commented on June 10, 2024

Thank you for your kind words. I'll have a look 😁
A post in any community you take part in would help a lot the project grow.

from megabots.

Blubbaa avatar Blubbaa commented on June 10, 2024

I think this feature would be very helpful and could also greatly extend the number of potential users of this library.

I have already tested to switch the endpoints to Azure OpenAI, but it involved some "hacking" in the library code, beside setting the respective environment variables. If needed I can share exactly what I have changed to make it work, but in general I don't like the approach since it's quite hacky and the integration should be done more thoughtfully I think. As a summary it involved setting these environment variables:

os.environ["OPENAI_API_TYPE"] = "azure"
os.environ["OPENAI_API_KEY"] = "661xxxxxxxxxxxxxxxxxxxxx80c8"
os.environ["OPENAI_API_BASE"] = "https://xxxxxxxxx.openai.azure.com/"
os.environ["OPENAI_API_VERSION"] = "2023-05-15"

And then adding the AzureChatOpenAI LLM from langchain in the select_model function, as well as setting the deployment arg for the OpenAIEmbeddings models.

@momegas, here is some more information on differences between OpenAI and Azure OpenAI enpoints: https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/switching-endpoints

from megabots.

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.