8000 New Azure endpoint · Issue #237 · haesleinhuepf/bia-bob · GitHub
[go: up one dir, main page]

Skip to content

New Azure endpoint #237

Open
Open

Description

@haesleinhuepf

I just learned that this code:

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.getenv("OPENAI_API_KEY")
)

... needs to be replaced with this code to use azure:

import os
from openai import AzureOpenAI
    
client = AzureOpenAI(
    api_key=os.getenv("AZURE_OPENAI_API_KEY"),  
    api_version=os.environ["AZURE_OPENAI_API_VERSION"],
    azure_endpoint=os.getenv("AZURE_OPENAI_ENDPOINT")
)

Let's move the code in promt_azure function in src/bia_bob/endpoints/_azure.py to a new file src/bia_bob/endpoints/_github_models.py and name the function in there prompt_github_models. Afterwards, we can implement a new promt_azure function in src/bia_bob/endpoints/_azure.py, and add a new if-block in the generate_response in src/bia_bob/_utilities.py.

git-bob implement this and also note that this would close #236

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0