bump 331rc3 exp 39 (#13086)

This commit is contained in:
Bagatur 2023-11-08 13:00:13 -08:00 committed by GitHub
parent 9f077270c8
commit 1f85ec34d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 36 additions and 3 deletions

View File

@ -17,7 +17,7 @@
"metadata": {},
"outputs": [],
"source": [
"!pip install -U openai \"langchain>=0.0.331rc2\" langchain-experimental"
"!pip install -U openai \"langchain>=0.0.331rc3\" langchain-experimental"
]
},
{
@ -389,6 +389,35 @@
")\n",
"print(output.llm_output)"
]
},
{
"cell_type": "markdown",
"id": "aa6565be-985d-4127-848e-c3bca9d7b434",
"metadata": {},
"source": [
"## Breaking changes to Azure classes\n",
"\n",
"OpenAI V1 rewrote their clients and separated Azure and OpenAI clients. This has led to some changes in LangChain interfaces when using OpenAI V1.\n",
"\n",
"BREAKING CHANGES:\n",
"- To use Azure embeddings with OpenAI V1, you'll need to use the new `AzureOpenAIEmbeddings` instead of the existing `OpenAIEmbeddings`. `OpenAIEmbeddings` continue to work when using Azure with `openai<1`.\n",
"```python\n",
"from langchain.embeddings import AzureOpenAIEmbeddings\n",
"```\n",
"\n",
"\n",
"RECOMMENDED CHANGES:\n",
"- When using AzureChatOpenAI, if passing in an Azure endpoint (eg https://example-resource.azure.openai.com/) this should be specified via the `azure_endpoint` parameter or the `AZURE_OPENAI_ENDPOINT`. We're maintaining backwards compatibility for now with specifying this via `openai_api_base`/`base_url` or env var `OPENAI_API_BASE` but this shouldn't be relied upon.\n",
"- When using Azure chat or embedding models, pass in API keys either via `openai_api_key` parameter or `AZURE_OPENAI_API_KEY` parameter. We're maintaining backwards compatibility for now with specifying this via `OPENAI_API_KEY` but this shouldn't be relied upon."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "52b48493-e4fe-4ab9-97cd-e65bf3996e30",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {

View File

@ -1,6 +1,6 @@
[tool.poetry]
name = "langchain-experimental"
version = "0.0.38"
version = "0.0.39"
description = "Building applications with LLMs through composability"
authors = []
license = "MIT"

View File

@ -57,6 +57,8 @@ class AzureChatOpenAI(ChatOpenAI):
azure_endpoint: Union[str, None] = None
"""Your Azure endpoint, including the resource.
Automatically inferred from env var `AZURE_OPENAI_ENDPOINT` if not provided.
Example: `https://example-resource.azure.openai.com/`
"""
deployment_name: Union[str, None] = Field(default=None, alias="azure_deployment")

View File

@ -17,6 +17,8 @@ class AzureOpenAIEmbeddings(OpenAIEmbeddings):
azure_endpoint: Union[str, None] = None
"""Your Azure endpoint, including the resource.
Automatically inferred from env var `AZURE_OPENAI_ENDPOINT` if not provided.
Example: `https://example-resource.azure.openai.com/`
"""
azure_deployment: Optional[str] = None

View File

@ -1,6 +1,6 @@
[tool.poetry]
name = "langchain"
version = "0.0.331rc2"
version = "0.0.331rc3"
description = "Building applications with LLMs through composability"
authors = []
license = "MIT"