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

Adding support for Azure OpenAI #73

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

leonardobaggio
Copy link

@leonardobaggio leonardobaggio commented Oct 17, 2024

Adding support for Azure OpenAI.

Usage:

embedding_client = processing.AzureOpenAIEmbeddings(
    api_key="xxxxxxxxxxxxxxxxxxxxxxxxxxx",
    api_endpoint="https://your-endpoint.openai.azure.com/",
    deployment="text-embedding-3-large", #custom deployment names in Azure replaced the 'model' param
    api_version="2024-02-15-preview" #optional: defaults to 2024-02-15-preview
)

#for the SemanticIngestionPipeline, specifying "api_endpoint" will redirect to AzureOpenAIEmbeddings
semantic_pipeline = processing.SemanticIngestionPipeline(
    api_key="xxxxxxxxxxxxxxxxxxxxxxxxxxx",
    api_endpoint="https://your-endpoint.openai.azure.com/",
    deployment="text-embedding-3-large",
    api_version="2024-02-15-preview", #optional: defaults to 2024-02-15-preview
    min_tokens=64,
    max_tokens=1024,
)

@leonardobaggio leonardobaggio changed the title Azure openai Adding support for Azure OpenAI Oct 17, 2024
leonardobaggio added 2 commits October 17, 2024 18:34
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

Successfully merging this pull request may close these issues.

1 participant