-
Notifications
You must be signed in to change notification settings - Fork 743
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Roman/azure cognitive embeddings (#1524)
### Description This PR is two-fold: **Embeddings:** * Embeddings incorporated into the sharepoint source connector, which will now call out to OpenAI and create embeddings if the flag is passed in and the api key provided. **Writing vector content (embeddings) to Azure cognitive search index:** * The schema for the index expected to exist in Azure has been updated to include the vector field type and a test script has been added to test the new content being produced from the Sharepoint connector to push the embedding content. Some important notes about other changes in here: * The embedding code had to be updated to patch the `to_dict` method on elements to add `embeddings` to the dict output if that was added. While the code originally added the embedding content, when `to_dict` was called to save the content as json, this was lost.
- Loading branch information
Showing
31 changed files
with
569 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
-c constraints.in | ||
-c base.txt | ||
langchain | ||
tiktoken | ||
openai |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
# | ||
# This file is autogenerated by pip-compile with Python 3.8 | ||
# by the following command: | ||
# | ||
# pip-compile requirements/ingest-openai.in | ||
# | ||
aiohttp==3.8.5 | ||
# via | ||
# langchain | ||
# openai | ||
aiosignal==1.3.1 | ||
# via aiohttp | ||
async-timeout==4.0.3 | ||
# via | ||
# aiohttp | ||
# langchain | ||
attrs==23.1.0 | ||
# via aiohttp | ||
certifi==2023.7.22 | ||
# via | ||
# -c requirements/base.txt | ||
# -c requirements/constraints.in | ||
# requests | ||
charset-normalizer==3.2.0 | ||
# via | ||
# -c requirements/base.txt | ||
# aiohttp | ||
# requests | ||
dataclasses-json==0.6.1 | ||
# via | ||
# -c requirements/base.txt | ||
# langchain | ||
frozenlist==1.4.0 | ||
# via | ||
# aiohttp | ||
# aiosignal | ||
idna==3.4 | ||
# via | ||
# -c requirements/base.txt | ||
# requests | ||
# yarl | ||
langchain==0.0.298 | ||
# via -r requirements/ingest-openai.in | ||
langsmith==0.0.40 | ||
# via langchain | ||
marshmallow==3.20.1 | ||
# via | ||
# -c requirements/base.txt | ||
# dataclasses-json | ||
multidict==6.0.4 | ||
# via | ||
# aiohttp | ||
# yarl | ||
mypy-extensions==1.0.0 | ||
# via | ||
# -c requirements/base.txt | ||
# typing-inspect | ||
numexpr==2.8.6 | ||
# via langchain | ||
numpy==1.24.4 | ||
# via | ||
# -c requirements/constraints.in | ||
# langchain | ||
# numexpr | ||
openai==0.28.1 | ||
# via -r requirements/ingest-openai.in | ||
packaging==23.1 | ||
# via | ||
# -c requirements/base.txt | ||
# marshmallow | ||
pydantic==1.10.12 | ||
# via | ||
# -c requirements/constraints.in | ||
# langchain | ||
# langsmith | ||
pyyaml==6.0.1 | ||
# via langchain | ||
regex==2023.8.8 | ||
# via | ||
# -c requirements/base.txt | ||
# tiktoken | ||
requests==2.31.0 | ||
# via | ||
# -c requirements/base.txt | ||
# langchain | ||
# langsmith | ||
# openai | ||
# tiktoken | ||
sqlalchemy==2.0.21 | ||
# via langchain | ||
tenacity==8.2.3 | ||
# via langchain | ||
tiktoken==0.5.1 | ||
# via -r requirements/ingest-openai.in | ||
tqdm==4.66.1 | ||
# via | ||
# -c requirements/base.txt | ||
# openai | ||
typing-extensions==4.8.0 | ||
# via | ||
# -c requirements/base.txt | ||
# pydantic | ||
# sqlalchemy | ||
# typing-inspect | ||
typing-inspect==0.9.0 | ||
# via | ||
# -c requirements/base.txt | ||
# dataclasses-json | ||
urllib3==1.26.16 | ||
# via | ||
# -c requirements/base.txt | ||
# -c requirements/constraints.in | ||
# requests | ||
yarl==1.9.2 | ||
# via aiohttp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.