Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
refactor(azure-embedding): Removed unnecessary and commented Azure embedding code (#2461)
Krishnakumar R (KK)6b2addf4b8a3
diff --git a/letta/embeddings.py b/letta/embeddings.pyindex 4dca8aab6..776671b51 100644--- a/letta/embeddings.py+++ b/letta/embeddings.py@@ -246,19 +246,6 @@ def embedding_model(config: EmbeddingConfig, user_id: Optional[uuid.UUID] = Nonemodel_settings.azure_api_version is not None,])- # from llama_index.embeddings.azure_openai import AzureOpenAIEmbedding-- ## https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#embeddings- # model = "text-embedding-ada-002"- # deployment = credentials.azure_embedding_deployment if credentials.azure_embedding_deployment is not None else model- # return AzureOpenAIEmbedding(- # model=model,- # deployment_name=deployment,- # api_key=credentials.azure_key,- # azure_endpoint=credentials.azure_endpoint,- # api_version=credentials.azure_version,- # )-return AzureOpenAIEmbedding(api_endpoint=model_settings.azure_base_url,api_key=model_settings.azure_api_key,diff --git a/letta/llm_api/azure_openai.py b/letta/llm_api/azure_openai.pyindex face29b23..a6004276d 100644--- a/letta/llm_api/azure_openai.py+++ b/letta/llm_api/azure_openai.py@@ -119,15 +119,3 @@ def azure_openai_chat_completions_request(chat_completion = client.chat.completions.create(**data)return ChatCompletionResponse(**chat_completion.model_dump())---def azure_openai_embeddings_request(- resource_name: str, deployment_id: str, api_version: str, api_key: str, data: dict-) -> EmbeddingResponse:- """https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#embeddings"""-- url = f"https://{resource_name}.openai.azure.com/openai/deployments/{deployment_id}/embeddings?api-version={api_version}"- headers = {"Content-Type": "application/json", "api-key": f"{api_key}"}-- response_json = make_post_request(url, headers, data)- return EmbeddingResponse(**response_json)