Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sweep: Add new LLMs Azure OpenAI model beside OpenAI #1

Open
0x01001011 opened this issue Sep 26, 2023 · 0 comments
Open

Sweep: Add new LLMs Azure OpenAI model beside OpenAI #1

0x01001011 opened this issue Sep 26, 2023 · 0 comments

Comments

@0x01001011
Copy link
Owner

  • Config model Azure OpenAI on UI
  • Customize url model, api_key, api_version, engine

Here is sample Python to call Azure OpenAI model:

#Note: The openai-python library support for Azure OpenAI is in preview.
import os
import openai
openai.api_type = "azure"
openai.api_base = "https://connect-llms.openai.azure.com/"
openai.api_version = "2023-07-01-preview"
openai.api_key = os.getenv("OPENAI_API_KEY")

response = openai.ChatCompletion.create(
  engine="connect-llms-gpt-4-32k",
  messages = [],
  temperature=0.7,
  max_tokens=800,
  top_p=0.95,
  frequency_penalty=0,
  presence_penalty=0,
  stop=None)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant