Wrapper around OpenAI Azure API for chat completions.
# Source: https://github.com/zilliztech/deep-searcher | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
from typing import Dict, List
from deepsearcher.llm.base import BaseLLM, ChatResponse
class AzureOpenAI(BaseLLM):
"""
A class for interacting with Azure OpenAI API.
This class provides an interface to Azure OpenAI's chat completion API,
implementing the BaseLLM abstract class.
"""
def __init__(
self,
model: str,
azure_endpoint: str = None,
api_key: str = None,
api_version: str = None,
**kwargs,
):
"""
Initialize the AzureOpenAI client.
Args:
model (str): The name of
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key