Giter Club home page Giter Club logo

Comments (5)

bakks avatar bakks commented on August 22, 2024

👋 Hi, thanks for submitting an issue -- I don't know much about Azure OpenAI so I'm curious as to how it's different than the vanilla OpenAI API. What problems would this solve for you?

from butterfish.

Dreamail avatar Dreamail commented on August 22, 2024

👋 Hi, thanks for submitting an issue -- I don't know much about Azure OpenAI so I'm curious as to how it's different than the vanilla OpenAI API. What problems would this solve for you?

There is no difference in function between azure openai and official one, but it is easier to request gpt4 model in azure openai.

The API is as same as OpenAI, just different in API endpoint

(Sorry for that I am poor at English.

from butterfish.

Dreamail avatar Dreamail commented on August 22, 2024
#Note: The openai-python library support for Azure OpenAI is in preview.
import os
import openai
openai.api_type = "azure"
openai.api_base = "https://xxx.openai.azure.com/"
openai.api_version = "2023-07-01-preview"
openai.api_key = os.getenv("OPENAI_API_KEY")

response = openai.ChatCompletion.create(
  engine="GPT4-32k",
  messages = [],
  temperature=0.7,
  max_tokens=800,
  top_p=0.95,
  frequency_penalty=0,
  presence_penalty=0,
  stop=None)

There is the example given by auzre openai portal.
(Note that api base vary from users.

from butterfish.

bakks avatar bakks commented on August 22, 2024

Hey @Dreamail , I've just pushed a change that enables you to set a Base URL for the model API. In other words, this allows you to point butterfish at a different server than the OpenAI api. I haven't had a chance to test this with Azure yet, but it might work, will follow up.

If you want to try this, you can install butterfish from the latest commit (I haven't yet released), and then set the Base URL. Something like:

go install github.com/bakks/butterfish/cmd/butterfish@latest
$(go env GOPATH)/bin/butterfish shell -u http://localhost:1234/v1 -A

from butterfish.

Dreamail avatar Dreamail commented on August 22, 2024

Thx, I will try it if I have time later this day.

from butterfish.

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.