mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-24 15:43:54 +00:00
Merge branch 'master' into concept_docs
This commit is contained in:
commit
b68b89a230
32
.github/workflows/api_doc_build.yml
vendored
32
.github/workflows/api_doc_build.yml
vendored
@ -10,6 +10,7 @@ env:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: github.repository == 'langchain-ai/langchain' || github.event_name != 'schedule'
|
||||
runs-on: ubuntu-latest
|
||||
permissions: write-all
|
||||
steps:
|
||||
@ -73,6 +74,23 @@ jobs:
|
||||
with:
|
||||
repository: langchain-ai/langchain-unstructured
|
||||
path: langchain-unstructured
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
repository: langchain-ai/langchain-databricks
|
||||
path: langchain-databricks
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
repository: langchain-ai/langchain-ibm
|
||||
path: langchain-ibm
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
repository: langchain-ai/langchain-azure
|
||||
path: langchain-azure
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
repository: langchain-ai/langchain-mongodb
|
||||
path: langchain-mongodb
|
||||
|
||||
|
||||
|
||||
- name: Set Git config
|
||||
@ -97,7 +115,11 @@ jobs:
|
||||
langchain/libs/standard-tests \
|
||||
langchain/libs/experimental \
|
||||
langchain/libs/partners/milvus \
|
||||
langchain/libs/partners/unstructured
|
||||
langchain/libs/partners/unstructured \
|
||||
langchain/libs/partners/databricks \
|
||||
langchain/libs/partners/ibm \
|
||||
langchain/libs/partners/azure-dynamic-sessions \
|
||||
langchain/libs/partners/mongodb
|
||||
mv langchain-google/libs/genai langchain/libs/partners/google-genai
|
||||
mv langchain-google/libs/vertexai langchain/libs/partners/google-vertexai
|
||||
mv langchain-google/libs/community langchain/libs/partners/google-community
|
||||
@ -113,6 +135,10 @@ jobs:
|
||||
mv langchain-experimental/libs/experimental langchain/libs/experimental
|
||||
mv langchain-milvus/libs/milvus langchain/libs/partners/milvus
|
||||
mv langchain-unstructured/libs/unstructured langchain/libs/partners/unstructured
|
||||
mv langchain-databricks/libs/databricks langchain/libs/partners/databricks
|
||||
mv langchain-ibm/libs/ibm langchain/libs/partners/ibm
|
||||
mv langchain-azure/libs/azure-dynamic-sessions langchain/libs/partners/azure-dynamic-sessions
|
||||
mv langchain-mongodb/libs/mongodb langchain/libs/partners/mongodb
|
||||
|
||||
- name: Rm old html
|
||||
run:
|
||||
@ -131,8 +157,8 @@ jobs:
|
||||
run: |
|
||||
python -m pip install -U uv
|
||||
python -m uv pip install --upgrade --no-cache-dir pip setuptools
|
||||
# skip airbyte and ibm due to pandas dependency issue
|
||||
python -m uv pip install $(ls ./libs/partners | grep -vE "airbyte|ibm" | xargs -I {} echo "./libs/partners/{}")
|
||||
# skip airbyte due to pandas dependency issue
|
||||
python -m uv pip install $(ls ./libs/partners | grep -vE "airbyte" | xargs -I {} echo "./libs/partners/{}")
|
||||
python -m uv pip install libs/core libs/langchain libs/text-splitters libs/community libs/experimental
|
||||
python -m uv pip install -r docs/api_reference/requirements.txt
|
||||
|
||||
|
2
.github/workflows/check-broken-links.yml
vendored
2
.github/workflows/check-broken-links.yml
vendored
@ -7,7 +7,7 @@ on:
|
||||
|
||||
jobs:
|
||||
check-links:
|
||||
if: github.repository_owner == 'langchain-ai'
|
||||
if: github.repository_owner == 'langchain-ai' || github.event_name != 'schedule'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
2
.github/workflows/people.yml
vendored
2
.github/workflows/people.yml
vendored
@ -14,7 +14,7 @@ on:
|
||||
|
||||
jobs:
|
||||
langchain-people:
|
||||
if: github.repository_owner == 'langchain-ai'
|
||||
if: github.repository_owner == 'langchain-ai' || github.event_name != 'schedule'
|
||||
runs-on: ubuntu-latest
|
||||
permissions: write-all
|
||||
steps:
|
||||
|
19
.github/workflows/run_notebooks.yml
vendored
19
.github/workflows/run_notebooks.yml
vendored
@ -20,7 +20,7 @@ env:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
if: github.repository == 'langchain-ai/langchain' || github.event_name != 'schedule'
|
||||
name: "Test docs"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@ -35,23 +35,15 @@ jobs:
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install -e libs/core
|
||||
pip install -e libs/langchain
|
||||
pip install -e libs/community
|
||||
pip install --upgrade langchain-experimental
|
||||
pip install -e libs//partners/anthropic
|
||||
pip install -e libs//partners/chroma
|
||||
pip install -e libs//partners/openai
|
||||
pip install -e libs//partners/mistralai
|
||||
pip install jupyter langgraph click pypdf vcrpy
|
||||
poetry install --with dev,test
|
||||
|
||||
- name: Pre-download tiktoken files
|
||||
run: |
|
||||
python docs/scripts/download_tiktoken.py
|
||||
poetry run python docs/scripts/download_tiktoken.py
|
||||
|
||||
- name: Prepare notebooks
|
||||
run: |
|
||||
python docs/scripts/prepare_notebooks_for_ci.py --comment-install-cells
|
||||
poetry run python docs/scripts/prepare_notebooks_for_ci.py --comment-install-cells --working-directory ${{ github.event.inputs.working-directory || 'all' }}
|
||||
|
||||
- name: Run notebooks
|
||||
env:
|
||||
@ -59,5 +51,6 @@ jobs:
|
||||
MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}
|
||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
TAVILY_API_KEY: ${{ secrets.TAVILY_API_KEY }}
|
||||
WORKING_DIRECTORY: ${{ github.event.inputs.working-directory || 'all' }}
|
||||
run: |
|
||||
./docs/scripts/execute_notebooks.sh ${{ github.event.inputs.working-directory || 'all' }}
|
||||
./docs/scripts/execute_notebooks.sh $WORKING_DIRECTORY
|
||||
|
2
.github/workflows/scheduled_test.yml
vendored
2
.github/workflows/scheduled_test.yml
vendored
@ -10,7 +10,7 @@ env:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: github.repository_owner == 'langchain-ai'
|
||||
if: github.repository_owner == 'langchain-ai' || github.event_name != 'schedule'
|
||||
name: Python ${{ matrix.python-version }} - ${{ matrix.working-directory }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
|
@ -38,7 +38,7 @@ conda install langchain -c conda-forge
|
||||
|
||||
For these applications, LangChain simplifies the entire application lifecycle:
|
||||
|
||||
- **Open-source libraries**: Build your applications using LangChain's open-source [building blocks](https://python.langchain.com/docs/concepts/#langchain-expression-language-lcel), [components](https://python.langchain.com/docs/concepts/), and [third-party integrations](https://python.langchain.com/docs/integrations/platforms/).
|
||||
- **Open-source libraries**: Build your applications using LangChain's open-source [building blocks](https://python.langchain.com/docs/concepts/#langchain-expression-language-lcel), [components](https://python.langchain.com/docs/concepts/), and [third-party integrations](https://python.langchain.com/docs/integrations/providers/).
|
||||
Use [LangGraph](https://langchain-ai.github.io/langgraph/) to build stateful agents with first-class streaming and human-in-the-loop support.
|
||||
- **Productionization**: Inspect, monitor, and evaluate your apps with [LangSmith](https://docs.smith.langchain.com/) so that you can constantly optimize and deploy with confidence.
|
||||
- **Deployment**: Turn your LangGraph applications into production-ready APIs and Assistants with [LangGraph Cloud](https://langchain-ai.github.io/langgraph/cloud/).
|
||||
@ -119,7 +119,7 @@ Agents allow an LLM autonomy over how a task is accomplished. Agents make decisi
|
||||
Please see [here](https://python.langchain.com) for full documentation, which includes:
|
||||
|
||||
- [Introduction](https://python.langchain.com/docs/introduction/): Overview of the framework and the structure of the docs.
|
||||
- [Tutorials](https://python.langchain.com/docs/use_cases/): If you're looking to build something specific or are more of a hands-on learner, check out our tutorials. This is the best place to get started.
|
||||
- [Tutorials](https://python.langchain.com/docs/tutorials/): If you're looking to build something specific or are more of a hands-on learner, check out our tutorials. This is the best place to get started.
|
||||
- [How-to guides](https://python.langchain.com/docs/how_to/): Answers to “How do I….?” type questions. These guides are goal-oriented and concrete; they're meant to help you complete a specific task.
|
||||
- [Conceptual guide](https://python.langchain.com/docs/concepts/): Conceptual explanations of the key parts of the framework.
|
||||
- [API Reference](https://api.python.langchain.com): Thorough documentation of every class and method.
|
||||
|
@ -18,7 +18,7 @@ for dir; do \
|
||||
if find "$$dir" -maxdepth 1 -type f \( -name "pyproject.toml" -o -name "setup.py" \) | grep -q .; then \
|
||||
echo "$$dir"; \
|
||||
fi \
|
||||
done' sh {} + | grep -vE "airbyte|ibm|couchbase|databricks" | tr '\n' ' ')
|
||||
done' sh {} + | grep -vE "airbyte|ibm|databricks" | tr '\n' ' ')
|
||||
|
||||
PORT ?= 3001
|
||||
|
||||
|
@ -533,6 +533,7 @@ def _build_index(dirs: List[str]) -> None:
|
||||
"airbyte": "Airbyte",
|
||||
"aws": "AWS",
|
||||
"ai21": "AI21",
|
||||
"ibm": "IBM",
|
||||
}
|
||||
ordered = ["core", "langchain", "text-splitters", "community", "experimental"]
|
||||
main_ = [dir_ for dir_ in ordered if dir_ in dirs]
|
||||
|
File diff suppressed because one or more lines are too long
1
docs/cassettes/agent_executor_114ba50d.msgpack.zlib
Normal file
1
docs/cassettes/agent_executor_114ba50d.msgpack.zlib
Normal file
@ -0,0 +1 @@
|
||||
eNrlV09z28YVb6c3nXLpfY3JKUNAAAiRoDSaDkUptqJItCXFlpzRcJaLBQETwMK7C4qkR4e4/QK49dZpLZMdjeokY0+bpnXPPfQLKId+iH6CvgUhi4o8k8zklJEO0P5577fv/3t8Ph1QLkKW/PI8TCTlmEjYiPz5lNOnGRXyd5OYyoB5p/fbe/svMh5efBRImYrlxUWchgZLaYJDg7B4cWAtkgDLRVinES1gTrvMG333qz8802IqBO5RoS2jz59phMFbiYSNdsgyhDlFGAU0Sv0sQliIUEgM1xWkcRZRRSZGQtJYO6mga9xBeGeeKhOUaydHcBIzj0bqqJdK3VE0Cews+C8kpziGjeQZhT3ApqC3zLiCMI26OmMsKkWVo7SA9rOkMI2CerdeBmkSHBcEEg/CaNQRFHMSdDgVWSRF54mYsXhUEB6mJZfWRDM6RJNemFDE4CYOx9RDPuNIWZDTgCYiHICImJAMBFSrxFNigyk8VL5goM8EVWZTjM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0GDFx8yy4v8tMlsP43Nwkk60Mfyl8W7vnX/D2nMcSvevkKxGk0Gv98P9ElUL3RqDvfXqcBO8+BWHYsvrlJUAKcWo1YnA8v6fXQyy8+hE0HV52GT2zXIth3rTqpOtitNahXX6Jmo+Hjv6vqSABHuTJlHFxNoRGGcpRfVGI8VCVntWotVWug6QrUWBJlHt3LuutM6SBWEDTliGHvy9bHeguTgOp7RTjm0/XDneb2ZuuvB/p8XOntdDZMTRMmktD3J3uUg1vyMxKxzIPayekEsHabh/kb16tafrVuYRfbrk/r+lp7b4ojEHJA8tdBdVVbdpyqtoJivOrWHNMsZqsvJrOS/93C7z0sseodIVR8TQ1iBMYwvbnZS+7SsajbGzsu6UdbVnjYfFLbsb1d09Mql21gxmFcjW5GEd1AQCAbpOoi7xK3VrmcrmbDlW7WrCpQzka0jg/iUJ6CVACbZFEEGAELiWpyME+FiUeH2rJZgSYXSawtPyunN21u7rsa8TTYcJhvBI5maCcVLWI9CPuuuISHF0OhRi6shq0Z1dHJwsLP1yJX6t+jUcS0W6b0ndumMLrHjm+dzgQnt07nzVun8ayq3zq14UfgrdNZMg+PbpvWv7kVCv+wjpqQLNXmtPx8vb2zcbSw8H/cixps
|
1
docs/cassettes/agent_executor_1f5932b6.msgpack.zlib
Normal file
1
docs/cassettes/agent_executor_1f5932b6.msgpack.zlib
Normal file
@ -0,0 +1 @@
|
||||
eNrlV01v48YZbtHb9tJL7rNEgQCFSJMSJZE2jECWnazi2Nq1HK+9gSGMyKHIiORwZ4b68MKHbnvshT+hXa8UGO4mwS7aNO323EP/gHPoj+gv6DsUFcvxAi2QUyEfaA7nnWfej+f90PPZkDAe0PinV0EsCMOOgAXPns8YeZoSLn47jYjwqXvxsN05fJGy4PpXvhAJX19bw0mg0YTEONAcGq0NjTXHx2IN3pOQ5DAXPepOvvvZ7JkSEc5xn3BlHX32THEo3BULWCgnNEWYEYSRT8LES0OEOQ+4wLBdQgqjIZFifMIFiZTzErp12g/uo9b7EerR3rJ0yglTz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NYtrDiUFr5EgY7GWV0N13h82EPQ0xonYTIWnWl8fMiilHvByZ5EDM8dP4wFxL5vvZP9byX4IrbQH2pNKxgnlRC3UzK6O1YN5o1Vb26/nqaZS1sdxcJanQvY2T4PR2XjkOqnr+sNRpNtnZiXokdTx3hRHoITIa0AhNeLZi0pFf1XsLIh4CcbrqqGruvHtWJV9JIRWAw7On0W359lFFbz/zV0BQQfQh7KXeXj+vrzPSAT8lTffgJi2bf/t3UILoLpt18vf3pYBPy+BGOWIf3NXoAC4KBsRvxov5NXAza5/CYuua5sWqTvEs4jtVO1K3XZdXLUNy6qVDbvi/EVWRwdwZCgTyiDUBBphICbZdSnCY1lyNitGtVIDSzegxjph6pJO2tum0ga+gaAphxS7XzY/VJvY8YnayemYzbZP9ht7reafjtVlXqntZD5UzWLK48Dzph3CICzZpRPS1IXaycgUsA4aJ9kby60YnqnbGNc8yyN1davdmeEQlBw62Wu/sqmsm2ZF2UAR3rRqpq7nM9avp/OS/93Pf+digWXvCKDiK3Igc2AcUxutPrSzo11Bjf090TiIY7dZjmh7d3TYGSqlRRuYn9BuRjgtZzcIOJANQnaRReLaRmkxXc2HK1WvGRWQnI9qXQ/UISwBrQA2TsMQMHwaOLLJwTwVxC4ZK+t6CZpcKLCy/qyY3pSl+e9m1FNgwWC+4Tico52XlJD2gfY9voCHGwMuRy4sh6251On5vXv/vx65Mf8BCUOqrJjRaAvG+hWz+f7KBfkBHa2czQ6OV87m1spZPO9kK2c2/PBdOZsFdfFk1az+YCUM/u82KlzQRFmy8rPt9v7O6b17/wHa8ni8
|
1
docs/cassettes/agent_executor_3fa4780a.msgpack.zlib
Normal file
1
docs/cassettes/agent_executor_3fa4780a.msgpack.zlib
Normal file
File diff suppressed because one or more lines are too long
1
docs/cassettes/agent_executor_550e0c6e.msgpack.zlib
Normal file
1
docs/cassettes/agent_executor_550e0c6e.msgpack.zlib
Normal file
@ -0,0 +1 @@
|
||||
eNrlV09v28gVb4GeAhTopfcJUaDAQqRJkZIpG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oNIgbQYQ6wg6Rz0SgUNAlaDr9UY93BOMuIsClMIsZ4IcuNl0IXm0G6prt9stFlGgNiTrDEWc5baQcFOewmWYEo9LpogrG+nbYO5zn9y0dsPP7vEZv0KhIYaaXr9gxOfN//8o+o1Jxb1SMYS+wuzp5+cfqi1919bdoxEL1zQ2565caXvG+/Vblm2992j3Vfe+usji9f/hlm858C3G+tfPPLmzJPLx3cWXr8qf0btenT53hv/uMR/unL02n0PdPys+/39S1ecW4GePSufbqrdp1Rvi797Rvjhw89Fxvjztp++9d4740fvT/079cbl1Y86DzStnd15YnSJ7YPT53Xx+auPVW/xHCpfOrtLmey/ec/Tf3mxuOfSxOy2VR+8XNDXd6Ihu7aPLMVa4g0Vk9pkVv37xJGvG+Tl8is/Gv7+qVVTb1R980+nPu0N/XLZJ6/NpJ6/+EJN2UsbG9/fufLiZG8gYlvdSJ9ff2X64+CpS++49I/Xfuupw9ebO2xPOEaX7qhr7tn+um34auCkeHzynnN71sy0LP4PWro5+fLXjvWeOGus/mdf+4dtz93wffKdC13HZ6dn0sEMNXNs14dvJusmPxoYk/4b/Fvn7orPD6+8VnPzJlm+4uDkvXuX9U6enXr1fn7f8daOqfqnftxwUiwo0b73299vKfjVyjj13fOnq5wP9L+0KXYwYEwr5+q314/+If725oey1OuXmtecab3v5sV7HWd/sePX7Ze1I0NnyM+W2WxffFFge3p2+/VXCmy2/wE4OX83
|
1
docs/cassettes/agent_executor_77c2f769.msgpack.zlib
Normal file
1
docs/cassettes/agent_executor_77c2f769.msgpack.zlib
Normal file
@ -0,0 +1 @@
|
||||
eNrtHctu3Na1QYEuDBRoFwW6vB20UBKIHL7mJcMoRiPZUWRZtiVLfsggOOTlDD18mZechwwBbfrYD7rptrUsFYbrJEiQpmndRVdd9AecRRf9hK676LmXpIZja2Ln0TYeMnDk4X2ce97n8pzj0TvHfRwQy3Nfe2S5IQ40PYQH8qt3jgN8N8Ik/PmRg8OuZxxe3tzavh8F1tM3u2Hok6VyWfMt3vOxq1m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BfyJS7GOUWMWrOCZYEqfgHNUUZsqjUFCJ+tURcKYpx80jwS/w2cBJ6/mm/B/w/5izgpg==
|
1
docs/cassettes/agent_executor_9c9ce713.msgpack.zlib
Normal file
1
docs/cassettes/agent_executor_9c9ce713.msgpack.zlib
Normal file
File diff suppressed because one or more lines are too long
1
docs/cassettes/agent_executor_ae627966.msgpack.zlib
Normal file
1
docs/cassettes/agent_executor_ae627966.msgpack.zlib
Normal file
@ -0,0 +1 @@
|
||||
eNrlV91u28gV7gK9CrBAb3o/YQssUIg0KVF/NoxAlp1E69hKIm9ie2EII3IoMiI5zMxQf4EvmvYF+AjddaSF4WZ3kaDdbpte96Iv4L3oQ/QJeoak1nIcoAX2qpAvaA7nnG/OzzfnHL2cDwnjHg0/uvBCQRi2BCx48nLOyPOYcPH7WUCES+2zh+3OwZcx8y5/4woR8fW1NRx5Go1IiD3NosHa0FizXCzW4D3ySQpz1qP25Ief/+qFEhDOcZ9wZR19/kKxKJwVClgoRzRGmBGEkUv8yIl9hDn3uMCwXUAKoz6RYnzCBQmU0wK6pu16t1HrkwD1aG9ZOuaE3ZC9T3yfoi3au43u0xGycIha+WFoAlYIauPJnWWYK0vexxqBo59wFExQiANy5+bZJ/AloDbx5ad+JFRTyoSwMuA/F4zgABaCxQTW4FoEsRcxkxC6VpXfKPXzcIlJlEI7cZimR0L9+L4OlkkjpIDAQ8+fdDnBzHK7jPDYF7z7jGcqNuEW86JcS2mgTA6RsO+FBFHYCbwpsZFDGZJZZMQlIfeGYCK2rBgMlG+hLc2GdNgoP0FDn3EiUycVR6CTxjMkICEoKPARYShlkyQFwj0aCwR4DKKJyBCeANEKI/jKXRr7NupJQuTmgSKbaNKBCDNwFFjKU68jBuxjwiPZMpVL395zdBlHGuRTOkBxJBEXkYWEeGFfOT2ViQTie4zYMvY56MmSKO09IxYw4jTlxP+cGh+HfR54ws2z84GEdDI7ZRC9EJ4Bljt5uB6Afkfqa+guCOBwciOiP4oU0vgHkCMEbETC9TiSdLr9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qy7xS21E20c1DykPPcWYdwiAtybnl09iG4snIDLAeN46StzW7ZDim7pi9olFzSFXdanfm2Acjh1byxi1tKuumWVI2UIA3axVT19MB77ezrOb/8HFsY4Fl8/Cg5CtyGrRgFlQbrT50pgejfmsUNw8ePbsXuXeP2fE03u47baWw6AOZhnY1P2opu0HAgtsgZBtZ3Nx6sbAYr7LpStUrRgkkszmx64A5hEVgFcCGse8Dhks9S3Y5GKi80CZjZV0vQJfzBVbWX+Tj29LIV7ia9xRYMBhwOPYztNOC4tM+0L7HF/BwosflzIXltJVJnZzeuvX/G5Er92FGl+P0SvmcDvYr57THV85l+EG4aj5rK5dk+MG/cj5bOFw5n1sr53E2sKyc2xMar5zPTsyES1ZuEruzEg7/dx8VLmikLHn5+XZ7f+fk1q3/ABRjSX4=
|
1
docs/cassettes/agent_executor_af83d3e3.msgpack.zlib
Normal file
1
docs/cassettes/agent_executor_af83d3e3.msgpack.zlib
Normal file
@ -0,0 +1 @@
|
||||
eNrtVs1u20YQRoA+CLHoqRAlkvpnkYNhBAnQGg4Qt0ARBIsVOSS3JneZ3aVlxdAhbq49sE/Q1oYVGEnbQ9FLG7THHvoC7r3v0VlKyo+jIkZ6CloBgqSdnZlvZr75qOPFASjNpbj2hAsDikUGf+ivjhcK7legzaOzAkwm45ObN/ZOKsUv3s+MKXXY6bCSt3XBTdbOmUijjHHRjmTR4SKRpxMZz35bZMBiDP/o/BMNyt1KQZj6R3u78XPLWcdr+20/GH2/FUVQGveGiGTMRVo/TR/wsuXEkOTMwNnSXP/AyjLnEbMYO59rKc63pRDQYK7P9wFKl+X8AB4r0CWWAV+cacNMpY9PMS788fuiAK1ZCt/ufrQG9+VpjBnqZ3sVtBy/7+xGxgm8oOf4o7AXhL2uc3Nn70kksTvCuGZWwuswnkYsysC1l5TM68dCus3JLxa31u720uBu5bmcujtNQ3X9zQcXzsYL2wpiTMZZrutToyr46dK1HXZou1mfDDzv540hdhVPuai/Xmzlxr1zENUX7ax7nYS9Xpd86BTsetAfB57ntbKuG4w3GM5wYkiNelEd8EgqsbmUW8seYinfba869DGI1GT1SW/UP/mUs/ocB+ykUqY5PLsU48ZhKTW8FKShzUOcmUIO/HntryOyYicJidcetgceaRHsPOBoKRyWXDUzoIYXQEJR5XmLTJiJMor+SF6KE0l4SsIjUqFHUeWGl0wZCiIuJRKehLa9LaIjlgOtSnpf8wdAMX+agiKhb1v0wipMphCspjlHAqN5sDbGciqogKI0sxfePbTacOvbTaznB3QyM6BJGHjjod8PvHmLcIF0FRFQZH2qLWxcGVxKA5RxivuoZgidTXKI18ilSmmEoJo+xFyvjAlyx9aVySk1JqcVXzsY3HGskIOicbXqX8xmTbZcitTuDwboNWAzqczqwO8hQA1MYXcvYZhKta9LG1ZHsgRqMXFxwJvy1ki6VBupcPde9Z7P/1lqdt8kNfjGU93JpnimwR92ML1g3E0qsRQyl1nR6VgR0eZ/Vfqvq9KpH/j/Vpbe+/WILIlHkXQZShPzB/0+DmfiDVgyicf92B/2euMk8Lv+IBj74A2DQeJ34yhhyXjsRZEX+yNvNGTxYDRmfRS1ggmeIEXtFnJcjbvkOdPRWiqJyqLxG54Y/NjGj9vN4R5qjiUjuYfKGOGa4oYjGxAVzh0RVxFuHXrsT5laSsqKbPj97pVy3ZlpA8XO0uttky6jvqm61a0Weds0Zu0Rks9k5TAFDnMyyMukyh2mNbf6ahNwUVaGHjDFrRbZXmCOtTdNpCqw9pAk7nLoFhs+N5D7L/scze2rdaUurvqnb+eok5nMkVpXL0uWdqlZvhbcNQYqWNH4YQ6acSuwM3JVRLcqJN07N9ajZnLzjSNcHpF3Y5Kr5+LlUTbPK3yOKvs3pmQxjvPexlpfu9h6lQatdTewLgKHDBuy5Pn8b285bDI=
|
1
docs/cassettes/agent_executor_b6a7e925.msgpack.zlib
Normal file
1
docs/cassettes/agent_executor_b6a7e925.msgpack.zlib
Normal file
@ -0,0 +1 @@
|
||||
eNqlVn1sG+UZd+mQAE0VTAy0Tduu3oeq4jvf2Wf7nCxDjuPSNM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8NLLwp8ADe/eY3730TnnLwj/77nlv4z/Gnt105/j+Lb/oTk2fvXT7f6gfLKXGNh+vfPzcm45IT9/k+/bZ5Q+7b8xu3fpo15dnDn209/U//+3Ca4vnNv1O3/TO6YnIT2qn/r4c/PVvJp69sDv8zRNb2Bd2vLK7773/vn45cOb6uTMX750988jKckvgtw+9ER+u7n83uCQ9NXsnIHn58kbfzsdeOXD/dT7f/wBEhTET
|
1
docs/cassettes/agent_executor_c4073e35.msgpack.zlib
Normal file
1
docs/cassettes/agent_executor_c4073e35.msgpack.zlib
Normal file
@ -0,0 +1 @@
|
||||
eNrlV89u28gZb9Fb0EMvvU+IngqRJiVKomwYhSw7G8drK7G8iZ2FIYyGQ5ErksPMDCXRgQ/N7gvwEdo4cmG43l0kaLfbpuce+gLeQx+iT9BvKGktrwO0wJ4K+UBzON//7/f90avzIeUiYPFPL4NYUo6JhIPIX51z+iKlQn4xiaj0mXv2uN05eJ3y4PrXvpSJWF1ZwUlgsITGODAIi1aG1grxsVyB9ySkhZizHnOz73529VKLqBC4T4W2ij59qREGumIJB+2IpQhzijDyaZh4aYiwEIGQGK5LSOMspIpMZELSSDstoVvcfnAfRRmKcURRIFCP9RaZUkG5dnoMXyLm0lB96idStxVNDCcL/gvJKY7gIHlK4QxaEgiDTLkSYRp19Y2xcGa5zJJCtJfGRaSUqO/fV8E4ZYoikHgYhFlXUMyJ3+VUpKEU3c/ElMWlgvAgmXFpTTSlQzTuBzFFDG6i4IS6yGMcqYBy6tNYBEMwEROSgoHqLXaV2RAZF800GOgTQVUUFeMIeFAGAY4pUEgGDGJEOSoSq/KDcI+lEoE8DgFFdAhPELEdJ/BV+CwNXdRTuZmZB4w8M5QDCebgKABGFF4nHIDAZUCnx4KuePuBo4tylEEhYwOUJkriPLKQkCDua6enKpGAwYBTV8V+JvR4gZT1PqNEAmkBi/85NSGO+yIKpD/LzgcS0pnaqYIYxPCMsLqZhetj4O8ofgM9AAIcZ3ci+j1JqYh/BDlCgEYkfUCpg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xphJITpW0Dp/+8Om3K+Q078SNqFPbP5tydiFn9JddzZvrdpye3fr7RkNW+YNvjL7hu9Sb3fD1dFD3UUN8u/U6WvJxD+zTehbgzP39A4/pfX8+PPIeXbDtaXrjz/9te3IWMnV0eO/Vh/d9T0B7Mu/iWz/5E7txa5by7p3pR9aM3QGGTn/wrHg1tp5tnLx/M4euXn80p9XlrRWHH6uVp8Ta54xv8B04vWlba53bry74Hpq//nYozZ9wWdVpv4FN+ec3qGflvlxDp/Fbr98sa27Tp314u0ZJx39lOm97GPFN4++vGTWmuKSU23UlUWOW9vo2T5w7tvTr92ptaXfzJxt+WHr0Lrvmtfu6Xi84ER27/Bfrpnxlr5n3w5e7k5s/KJoR/UHnj+KgwML3Z172s6clYdaFyuHbAuHe9G9Z1DymV/+/rzqyVNS3e7oopN7Pl0lFl8IFmmv8udW3i3coG+7Ptdkunu30DT2iPBScobJ9C/lF2Dr
|
1
docs/cassettes/agent_executor_dae53ec6.msgpack.zlib
Normal file
1
docs/cassettes/agent_executor_dae53ec6.msgpack.zlib
Normal file
File diff suppressed because one or more lines are too long
1
docs/cassettes/agent_executor_e593bbf6.msgpack.zlib
Normal file
1
docs/cassettes/agent_executor_e593bbf6.msgpack.zlib
Normal file
@ -0,0 +1 @@
|
||||
eNqFVktv20YQRi75HQtd1KYSxZeeQREocpwUsaU0UmAUQUFsyJG0Fblkdpd6xPCh6eOuv9C4dhGkrU+95eJTD/0F+TWdJUVZzqMFJIj77ezszPfNDPXyfA5CspjfeMO4AkF9hQu5fnku4HkKUv14FoGaxsHpo8Fw9CoV7O1UqUR2ajWaMEPROQtXhh9HNQlU+NPTZ3Gwenfj5nEJt70ZrEodUlLzcFVVo716szt8PLsHd9Png29ay6D+8KGC5dA1D2f9ZqlCSnijyE4splQRJomaAlkAxR9BGCfDfW0V0aUnQKahkmhrI5Lf7QWQqKk+ToM55T4E2ppxP0wD8II4oozrE0+/RRiWH4ULa8rlAgSiYxpK2NkQdOH5MVLF1Ud2WUQnI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nB1Rtet2sNy4v+gcxR850r9uNtnt5cXQvhDkidaRxrAzS7xooxeXFvoEyXV70DGIY+Egj8mhvlA1wCyXJWrCRXIG2mYPEIPubhMkeJpFK/QcC0W6Qx4yMPQYZp8IHmfv+FJO3r09TcpeuSFcArZBe9zaxLXIf/5EAeRAnCR7qzvEVM1RxQuq3yaHmTMBKm5K203adar1u4kYvjiKkUN4hXxcz/8517c1Gu2F9TPt8+GcvRE8Pt1IHOayf/AtKkges
|
1
docs/cassettes/assign_5.msgpack.zlib
Normal file
1
docs/cassettes/assign_5.msgpack.zlib
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
||||
eNqdVntQFPcdB8HKxNqQZDo2sY/NNTEJsMfu3cLdQa6KhzyFAw5Pnr38bvd3dwt3u+s+7gFzfSCxKcmksybRpo5xgsAhIhLxhUE6dbQx0bGx1WRwEhxjoq1NGlPb2s4kob9dDoXR/tOdm9vd3+/zfX++3992JcJQlFieSx1mORmKgJbRi6R2JUS4UYGS3D0QgnKAZ/pqnK76XYrITmUFZFmQCnJzgcAaeQFygDXSfCg3TObSASDnomchCHU1fV6eiV1ctKzTEIKSBPxQMhRgzZ0Gmke2OBm9GDYgkSckTA5ALAIBuokYy2GukhysutGBAY7B1hWtMuRgBpEPQk1AkaBoiLeilRDPwKC25BdknOLxEMuxGpJDayS6S7IIQQi9+EBQgmhBhiEBhSgroqaJMFq0NZ4PJr2SY4JuwadwehY0XbefC7BOAwdCOsAPZQ+tiCIKwZN0WsMyUKJFVkjCDaVQ1sNKIueHBzA/G4YcFuRpMGdJACJSj0og6bbmnOG9bZCWdYCIki3KLJwF3Jadj0Yhs5z/Hs7Ua46wckzPqCQDGeUDGv1GzAU4rEQEHM1KNJ+DOYoMcSStcKz8PxRDTtFy2mygYVBiFUnPEgigEAMQCbXGNXmNPKwIGR1421O0F2+NJwIQMCjMX/UFeElWRxbSaB+gaYjqCTmaZ5BJda+/gxVyMAb6gsjrIUQdDuolUYfaIRRwEESpHJi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qnZxfOLXqP/kbecOV5P3Pi9Q1/vdQu3Ax7RuEHqbPcxdGNBz9b/KTtvnC6Zs+vKn7YAs9v/fzT75xqPVR58h8/Hdm8o3D3hTHnkbbR4M2vtx0e+rlyPUG9f63iRvi9j9TtShIdm/+jNLI9/X4/1uTmzXVlWx46CxbvKiv7LxN30us=
|
File diff suppressed because it is too large
Load Diff
@ -251,7 +251,7 @@ Callback handlers can either be `sync` or `async`:
|
||||
* Sync callback handlers implement the [BaseCallbackHandler](https://python.langchain.com/api_reference/core/callbacks/langchain_core.callbacks.base.BaseCallbackHandler.html) interface.
|
||||
* Async callback handlers implement the [AsyncCallbackHandler](https://python.langchain.com/api_reference/core/callbacks/langchain_core.callbacks.base.AsyncCallbackHandler.html) interface.
|
||||
|
||||
During run-time LangChain configures an appropriate callback manager (e.g., [CallbackManager](https://python.langchain.com/api_reference/core/callbacks/langchain_core.callbacks.manager.CallbackManager.html) or [AsyncCallbackManager](https://python.langchain.com/api_reference/core/callbacks/langchain_core.callbacks.manager.AsyncCallbackManager.html) which will be responsible for calling the appropriate method on each "registered" callback handler when the event is triggered.
|
||||
During run-time LangChain configures an appropriate callback manager (e.g., [CallbackManager](https://python.langchain.com/api_reference/core/callbacks/langchain_core.callbacks.manager.CallbackManager.html) or [AsyncCallbackManager](https://python.langchain.com/api_reference/core/callbacks/langchain_core.callbacks.manager.AsyncCallbackManager.html)) which will be responsible for calling the appropriate method on each "registered" callback handler when the event is triggered.
|
||||
|
||||
#### Passing callbacks
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
"\n",
|
||||
"## Dependencies\n",
|
||||
"\n",
|
||||
"**Note**: this guide requires `langchain-core` >= 0.2.13. We will also use [OpenAI](/docs/integrations/platforms/openai/) for embeddings, but any LangChain embeddings should suffice. We will use a simple [LangGraph](https://langchain-ai.github.io/langgraph/) agent for demonstration purposes."
|
||||
"**Note**: this guide requires `langchain-core` >= 0.2.13. We will also use [OpenAI](/docs/integrations/providers/openai/) for embeddings, but any LangChain embeddings should suffice. We will use a simple [LangGraph](https://langchain-ai.github.io/langgraph/) agent for demonstration purposes."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -22,7 +22,7 @@
|
||||
"2. LangChain [Runnables](/docs/concepts#runnable-interface);\n",
|
||||
"3. By sub-classing from [BaseTool](https://python.langchain.com/api_reference/core/tools/langchain_core.tools.BaseTool.html) -- This is the most flexible method, it provides the largest degree of control, at the expense of more effort and code.\n",
|
||||
"\n",
|
||||
"Creating tools from functions may be sufficient for most use cases, and can be done via a simple [@tool decorator](https://python.langchain.com/api_reference/core/tools/langchain_core.tools.tool.html#langchain_core.tools.tool). If more configuration is needed-- e.g., specification of both sync and async implementations-- one can also use the [StructuredTool.from_function](https://python.langchain.com/api_reference/core/tools/langchain_core.tools.StructuredTool.html#langchain_core.tools.StructuredTool.from_function) class method.\n",
|
||||
"Creating tools from functions may be sufficient for most use cases, and can be done via a simple [@tool decorator](https://python.langchain.com/api_reference/core/tools/langchain_core.tools.tool.html#langchain_core.tools.tool). If more configuration is needed-- e.g., specification of both sync and async implementations-- one can also use the [StructuredTool.from_function](https://python.langchain.com/api_reference/core/tools/langchain_core.tools.structured.StructuredTool.html#langchain_core.tools.structured.StructuredTool.from_function) class method.\n",
|
||||
"\n",
|
||||
"In this guide we provide an overview of these methods.\n",
|
||||
"\n",
|
||||
|
@ -50,7 +50,7 @@ pip install langchain-core
|
||||
### Integration packages
|
||||
|
||||
Certain integrations like OpenAI and Anthropic have their own packages.
|
||||
Any integrations that require their own package will be documented as such in the [Integration docs](/docs/integrations/platforms/).
|
||||
Any integrations that require their own package will be documented as such in the [Integration docs](/docs/integrations/providers/).
|
||||
You can see a list of all integration packages in the [API reference](https://api.python.langchain.com) under the "Partner libs" dropdown.
|
||||
To install one of these run:
|
||||
|
||||
|
@ -77,7 +77,7 @@
|
||||
"id": "08f8b820-5912-49c1-9d76-40be0571dffb",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"This creates a retriever (specifically a [VectorStoreRetriever](https://python.langchain.com/api_reference/core/vectorstores/langchain_core.vectorstores.VectorStoreRetriever.html)), which we can use in the usual way:"
|
||||
"This creates a retriever (specifically a [VectorStoreRetriever](https://python.langchain.com/api_reference/core/vectorstores/langchain_core.vectorstores.base.VectorStoreRetriever.html)), which we can use in the usual way:"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -29,7 +29,7 @@
|
||||
"Ensure the `langchain_community` and `friendli-client` are installed.\n",
|
||||
"\n",
|
||||
"```sh\n",
|
||||
"pip install -U langchain-comminity friendli-client.\n",
|
||||
"pip install -U langchain-community friendli-client.\n",
|
||||
"```\n",
|
||||
"\n",
|
||||
"Sign in to [Friendli Suite](https://suite.friendli.ai/) to create a Personal Access Token, and set it as the `FRIENDLI_TOKEN` environment."
|
||||
|
@ -36,12 +36,12 @@
|
||||
"### Integration details\n",
|
||||
"| Class | Package | Local | Serializable | [JS support](https://js.langchain.com/docs/integrations/chat/openai) | Package downloads | Package latest |\n",
|
||||
"| :--- | :--- | :---: | :---: | :---: | :---: | :---: |\n",
|
||||
"| ChatWatsonx | ❌ | ❌ | ❌ |  |  |\n",
|
||||
"| ChatWatsonx | ❌ | ❌ | ❌ | ❌ |  |  |\n",
|
||||
"\n",
|
||||
"### Model features\n",
|
||||
"| [Tool calling](/docs/how_to/tool_calling/) | [Structured output](/docs/how_to/structured_output/) | JSON mode | Image input | Audio input | Video input | [Token-level streaming](/docs/how_to/chat_streaming/) | Native async | [Token usage](/docs/how_to/chat_token_usage_tracking/) | [Logprobs](/docs/how_to/logprobs/) |\n",
|
||||
"| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |\n",
|
||||
"| ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ | ✅ | ❌ | "
|
||||
"| ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | ❌ | ✅ | ✅ | "
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -126,21 +126,19 @@
|
||||
"source": [
|
||||
"## Instantiation\n",
|
||||
"\n",
|
||||
"You might need to adjust model `parameters` for different models or tasks. For details, refer to [Available MetaNames](https://ibm.github.io/watsonx-ai-python-sdk/fm_model.html#metanames.GenTextParamsMetaNames)."
|
||||
"You might need to adjust model `parameters` for different models or tasks. For details, refer to [Available TextChatParameters](https://ibm.github.io/watsonx-ai-python-sdk/fm_schema.html#ibm_watsonx_ai.foundation_models.schema.TextChatParameters)."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"execution_count": 5,
|
||||
"id": "407cd500",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"parameters = {\n",
|
||||
" \"decoding_method\": \"sample\",\n",
|
||||
" \"max_new_tokens\": 100,\n",
|
||||
" \"min_new_tokens\": 1,\n",
|
||||
" \"stop_sequences\": [\".\"],\n",
|
||||
" \"temperature\": 0.9,\n",
|
||||
" \"max_tokens\": 200,\n",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
@ -160,20 +158,20 @@
|
||||
"In this example, we’ll use the `project_id` and Dallas URL.\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"You need to specify the `model_id` that will be used for inferencing. You can find the list of all the available models in [Supported foundation models](https://ibm.github.io/watsonx-ai-python-sdk/fm_model.html#ibm_watsonx_ai.foundation_models.utils.enums.ModelTypes)."
|
||||
"You need to specify the `model_id` that will be used for inferencing. You can find the list of all the available models in [Supported chat models](https://ibm.github.io/watsonx-ai-python-sdk/fm_helpers.html#ibm_watsonx_ai.foundation_models_manager.FoundationModelsManager.get_chat_model_specs)."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "98371396",
|
||||
"id": "e3568e91",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from langchain_ibm import ChatWatsonx\n",
|
||||
"\n",
|
||||
"chat = ChatWatsonx(\n",
|
||||
" model_id=\"ibm/granite-13b-chat-v2\",\n",
|
||||
" model_id=\"ibm/granite-34b-code-instruct\",\n",
|
||||
" url=\"https://us-south.ml.cloud.ibm.com\",\n",
|
||||
" project_id=\"PASTE YOUR PROJECT_ID HERE\",\n",
|
||||
" params=parameters,\n",
|
||||
@ -196,7 +194,7 @@
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"chat = ChatWatsonx(\n",
|
||||
" model_id=\"ibm/granite-13b-chat-v2\",\n",
|
||||
" model_id=\"ibm/granite-34b-code-instruct\",\n",
|
||||
" url=\"PASTE YOUR URL HERE\",\n",
|
||||
" username=\"PASTE YOUR USERNAME HERE\",\n",
|
||||
" password=\"PASTE YOUR PASSWORD HERE\",\n",
|
||||
@ -242,17 +240,17 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 22,
|
||||
"execution_count": 8,
|
||||
"id": "beea2b5b",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"AIMessage(content=\"Je t'aime pour écouter la Rock.\", response_metadata={'token_usage': {'generated_token_count': 12, 'input_token_count': 28}, 'model_name': 'ibm/granite-13b-chat-v2', 'system_fingerprint': '', 'finish_reason': 'stop_sequence'}, id='run-05b305ce-5401-4a10-b557-41a4b15c7f6f-0')"
|
||||
"AIMessage(content=\"J'adore que tu escois de écouter de la rock ! \", additional_kwargs={}, response_metadata={'token_usage': {'completion_tokens': 19, 'prompt_tokens': 34, 'total_tokens': 53}, 'model_name': 'ibm/granite-34b-code-instruct', 'system_fingerprint': '', 'finish_reason': 'stop'}, id='chat-ef888fc41f0d4b37903b622250ff7528', usage_metadata={'input_tokens': 34, 'output_tokens': 19, 'total_tokens': 53})"
|
||||
]
|
||||
},
|
||||
"execution_count": 22,
|
||||
"execution_count": 8,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
@ -273,17 +271,17 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 41,
|
||||
"execution_count": 9,
|
||||
"id": "8ab1a25a",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"AIMessage(content='Sure, I can help you with that! Horses are large, powerful mammals that belong to the family Equidae.', response_metadata={'token_usage': {'generated_token_count': 24, 'input_token_count': 24}, 'model_name': 'ibm/granite-13b-chat-v2', 'system_fingerprint': '', 'finish_reason': 'stop_sequence'}, id='run-391776ff-3b38-4768-91e8-ff64177149e5-0')"
|
||||
"AIMessage(content='horses are quadrupedal mammals that are members of the family Equidae. They are typically farm animals, competing in horse racing and other forms of equine competition. With over 200 breeds, horses are diverse in their physical appearance and behavior. They are intelligent, social animals that are often used for transportation, food, and entertainment.', additional_kwargs={}, response_metadata={'token_usage': {'completion_tokens': 89, 'prompt_tokens': 29, 'total_tokens': 118}, 'model_name': 'ibm/granite-34b-code-instruct', 'system_fingerprint': '', 'finish_reason': 'stop'}, id='chat-9a6e28abb3d448aaa4f83b677a9fd653', usage_metadata={'input_tokens': 29, 'output_tokens': 89, 'total_tokens': 118})"
|
||||
]
|
||||
},
|
||||
"execution_count": 41,
|
||||
"execution_count": 9,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
@ -314,7 +312,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 17,
|
||||
"execution_count": 10,
|
||||
"id": "dd919925",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
@ -338,17 +336,17 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 18,
|
||||
"execution_count": 11,
|
||||
"id": "68160377",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"AIMessage(content='Ich liebe Python.', response_metadata={'token_usage': {'generated_token_count': 5, 'input_token_count': 23}, 'model_name': 'ibm/granite-13b-chat-v2', 'system_fingerprint': '', 'finish_reason': 'stop_sequence'}, id='run-1b1ccf5d-0e33-46f2-a087-e2a136ba1fb7-0')"
|
||||
"AIMessage(content='Ich liebe Python.', additional_kwargs={}, response_metadata={'token_usage': {'completion_tokens': 7, 'prompt_tokens': 28, 'total_tokens': 35}, 'model_name': 'ibm/granite-34b-code-instruct', 'system_fingerprint': '', 'finish_reason': 'stop'}, id='chat-fef871190b6047a7a3e68c58b3810c33', usage_metadata={'input_tokens': 28, 'output_tokens': 7, 'total_tokens': 35})"
|
||||
]
|
||||
},
|
||||
"execution_count": 18,
|
||||
"execution_count": 11,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
@ -376,7 +374,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"execution_count": 12,
|
||||
"id": "3f63166a",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
@ -384,7 +382,7 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"The moon is a natural satellite of the Earth, and it has been a source of fascination for humans for centuries."
|
||||
"The Moon is the fifth largest moon in the solar system and the largest relative to its host planet. It is the fifth brightest object in Earth's night sky after the Sun, the stars, the Milky Way, and the Moon itself. It orbits around the Earth at an average distance of 238,855 miles (384,400 kilometers). The Moon's gravity is about one-sixthth of Earth's and thus allows for the formation of tides on Earth. The Moon is thought to have formed around 4.5 billion years ago from debris from a collision between Earth and a Mars-sized body named Theia. The Moon is effectively immutable, with its current characteristics remaining from formation. Aside from Earth, the Moon is the only other natural satellite of Earth. The most widely accepted theory is that it formed from the debris of a collision"
|
||||
]
|
||||
}
|
||||
],
|
||||
@ -410,18 +408,18 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 32,
|
||||
"execution_count": 13,
|
||||
"id": "9e948729",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"[AIMessage(content='Cats are domestic animals that belong to the Felidae family.', response_metadata={'token_usage': {'generated_token_count': 13, 'input_token_count': 24}, 'model_name': 'ibm/granite-13b-chat-v2', 'system_fingerprint': '', 'finish_reason': 'stop_sequence'}, id='run-71a8bd7a-a1aa-497b-9bdd-a4d6fe1d471a-0'),\n",
|
||||
" AIMessage(content='Dogs are domesticated mammals of the family Canidae, characterized by their adaptability to various environments and social structures.', response_metadata={'token_usage': {'generated_token_count': 24, 'input_token_count': 24}, 'model_name': 'ibm/granite-13b-chat-v2', 'system_fingerprint': '', 'finish_reason': 'stop_sequence'}, id='run-22b7a0cb-e44a-4b68-9921-872f82dcd82b-0')]"
|
||||
"[AIMessage(content='The cat is a popular domesticated carnivorous mammal that belongs to the family Felidae. Cats arefriendly, intelligent, and independent animals that are well-known for their playful behavior, agility, and ability to hunt prey. cats come in a wide range of breeds, each with their own unique physical and behavioral characteristics. They are kept as pets worldwide due to their affectionate nature and companionship. Cats are important members of the household and are often involved in everything from childcare to entertainment.', additional_kwargs={}, response_metadata={'token_usage': {'completion_tokens': 127, 'prompt_tokens': 28, 'total_tokens': 155}, 'model_name': 'ibm/granite-34b-code-instruct', 'system_fingerprint': '', 'finish_reason': 'stop'}, id='chat-fa452af0a0fa4a668b6a704aecd7d718', usage_metadata={'input_tokens': 28, 'output_tokens': 127, 'total_tokens': 155}),\n",
|
||||
" AIMessage(content='Dogs are domesticated animals that belong to the Canidae family, also known as wolves. They are one of the most popular pets worldwide, known for their loyalty and affection towards their owners. Dogs come in various breeds, each with unique characteristics, and are trained for different purposes such as hunting, herding, or guarding. They require a lot of exercise and mental stimulation to stay healthy and happy, and they need proper training and socialization to be well-behaved. Dogs are also known for their playful and energetic nature, making them great companions for people of all ages.', additional_kwargs={}, response_metadata={'token_usage': {'completion_tokens': 144, 'prompt_tokens': 28, 'total_tokens': 172}, 'model_name': 'ibm/granite-34b-code-instruct', 'system_fingerprint': '', 'finish_reason': 'stop'}, id='chat-cae7663c50cf4f3499726821cc2f0ec7', usage_metadata={'input_tokens': 28, 'output_tokens': 144, 'total_tokens': 172})]"
|
||||
]
|
||||
},
|
||||
"execution_count": 32,
|
||||
"execution_count": 13,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
@ -452,9 +450,7 @@
|
||||
"\n",
|
||||
"### ChatWatsonx.bind_tools()\n",
|
||||
"\n",
|
||||
"Please note that `ChatWatsonx.bind_tools` is on beta state, so right now we only support `mistralai/mixtral-8x7b-instruct-v01` model.\n",
|
||||
"\n",
|
||||
"You should also redefine `max_new_tokens` parameter to get the entire model response. By default `max_new_tokens` is set to 20."
|
||||
"Please note that `ChatWatsonx.bind_tools` is on beta state, so we recommend using `mistralai/mistral-large` model."
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -466,10 +462,8 @@
|
||||
"source": [
|
||||
"from langchain_ibm import ChatWatsonx\n",
|
||||
"\n",
|
||||
"parameters = {\"max_new_tokens\": 200}\n",
|
||||
"\n",
|
||||
"chat = ChatWatsonx(\n",
|
||||
" model_id=\"mistralai/mixtral-8x7b-instruct-v01\",\n",
|
||||
" model_id=\"mistralai/mistral-large\",\n",
|
||||
" url=\"https://us-south.ml.cloud.ibm.com\",\n",
|
||||
" project_id=\"PASTE YOUR PROJECT_ID HERE\",\n",
|
||||
" params=parameters,\n",
|
||||
@ -478,7 +472,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"execution_count": 2,
|
||||
"id": "e1633a73",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
@ -497,17 +491,17 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"execution_count": 3,
|
||||
"id": "3bf9b8ab",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"AIMessage(content='', additional_kwargs={'function_call': {'type': 'function'}, 'tool_calls': [{'type': 'function', 'function': {'name': 'GetWeather', 'arguments': '{\"location\": \"Los Angeles\"}'}, 'id': None}, {'type': 'function', 'function': {'name': 'GetWeather', 'arguments': '{\"location\": \"New York\"}'}, 'id': None}]}, response_metadata={'token_usage': {'generated_token_count': 99, 'input_token_count': 320}, 'model_name': 'mistralai/mixtral-8x7b-instruct-v01', 'system_fingerprint': '', 'finish_reason': 'eos_token'}, id='run-38627104-f2ac-4edb-8390-d5425fb65979-0', tool_calls=[{'name': 'GetWeather', 'args': {'location': 'Los Angeles'}, 'id': None}, {'name': 'GetWeather', 'args': {'location': 'New York'}, 'id': None}])"
|
||||
"AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'chatcmpl-tool-6c06a19bbe824d78a322eb193dbde12d', 'type': 'function', 'function': {'name': 'GetWeather', 'arguments': '{\"location\": \"Los Angeles, CA\"}'}}, {'id': 'chatcmpl-tool-493542e46f1141bfbfeb5deae6c9e086', 'type': 'function', 'function': {'name': 'GetWeather', 'arguments': '{\"location\": \"New York, NY\"}'}}]}, response_metadata={'token_usage': {'completion_tokens': 46, 'prompt_tokens': 95, 'total_tokens': 141}, 'model_name': 'mistralai/mistral-large', 'system_fingerprint': '', 'finish_reason': 'tool_calls'}, id='chat-027f2bdb217e4238909cb26d3e8a8fbf', tool_calls=[{'name': 'GetWeather', 'args': {'location': 'Los Angeles, CA'}, 'id': 'chatcmpl-tool-6c06a19bbe824d78a322eb193dbde12d', 'type': 'tool_call'}, {'name': 'GetWeather', 'args': {'location': 'New York, NY'}, 'id': 'chatcmpl-tool-493542e46f1141bfbfeb5deae6c9e086', 'type': 'tool_call'}], usage_metadata={'input_tokens': 95, 'output_tokens': 46, 'total_tokens': 141})"
|
||||
]
|
||||
},
|
||||
"execution_count": 4,
|
||||
"execution_count": 3,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
@ -530,18 +524,24 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"execution_count": 4,
|
||||
"id": "38f10ba7",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"[{'name': 'GetWeather', 'args': {'location': 'Los Angeles'}, 'id': None},\n",
|
||||
" {'name': 'GetWeather', 'args': {'location': 'New York'}, 'id': None}]"
|
||||
"[{'name': 'GetWeather',\n",
|
||||
" 'args': {'location': 'Los Angeles, CA'},\n",
|
||||
" 'id': 'chatcmpl-tool-6c06a19bbe824d78a322eb193dbde12d',\n",
|
||||
" 'type': 'tool_call'},\n",
|
||||
" {'name': 'GetWeather',\n",
|
||||
" 'args': {'location': 'New York, NY'},\n",
|
||||
" 'id': 'chatcmpl-tool-493542e46f1141bfbfeb5deae6c9e086',\n",
|
||||
" 'type': 'tool_call'}]"
|
||||
]
|
||||
},
|
||||
"execution_count": 5,
|
||||
"execution_count": 4,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
@ -567,7 +567,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.11.9"
|
||||
"version": "3.10.14"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
460
docs/docs/integrations/chat/oci_data_science.ipynb
Normal file
460
docs/docs/integrations/chat/oci_data_science.ipynb
Normal file
@ -0,0 +1,460 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "raw",
|
||||
"metadata": {
|
||||
"vscode": {
|
||||
"languageId": "raw"
|
||||
}
|
||||
},
|
||||
"source": [
|
||||
"---\n",
|
||||
"sidebar_label: ChatOCIModelDeployment\n",
|
||||
"---"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# ChatOCIModelDeployment\n",
|
||||
"\n",
|
||||
"This will help you getting started with OCIModelDeployment [chat models](/docs/concepts/#chat-models). For detailed documentation of all ChatOCIModelDeployment features and configurations head to the [API reference](https://api.python.langchain.com/en/latest/chat_models/langchain_community.chat_models.ChatOCIModelDeployment.html).\n",
|
||||
"\n",
|
||||
"[OCI Data Science](https://docs.oracle.com/en-us/iaas/data-science/using/home.htm) is a fully managed and serverless platform for data science teams to build, train, and manage machine learning models in the Oracle Cloud Infrastructure. You can use [AI Quick Actions](https://blogs.oracle.com/ai-and-datascience/post/ai-quick-actions-in-oci-data-science) to easily deploy LLMs on [OCI Data Science Model Deployment Service](https://docs.oracle.com/en-us/iaas/data-science/using/model-dep-about.htm). You may choose to deploy the model with popular inference frameworks such as vLLM or TGI. By default, the model deployment endpoint mimics the OpenAI API protocol.\n",
|
||||
"\n",
|
||||
"> For the latest updates, examples and experimental features, please see [ADS LangChain Integration](https://accelerated-data-science.readthedocs.io/en/latest/user_guide/large_language_model/langchain_models.html).\n",
|
||||
"\n",
|
||||
"## Overview\n",
|
||||
"### Integration details\n",
|
||||
"\n",
|
||||
"| Class | Package | Local | Serializable | JS support | Package downloads | Package latest |\n",
|
||||
"| :--- | :--- | :---: | :---: | :---: | :---: | :---: |\n",
|
||||
"| [ChatOCIModelDeployment](https://api.python.langchain.com/en/latest/chat_models/langchain_community.chat_models.ChatOCIModelDeployment.html) | [langchain-community](https://api.python.langchain.com/en/latest/community_api_reference.html) | ❌ | beta | ❌ |  |  |\n",
|
||||
"\n",
|
||||
"### Model features\n",
|
||||
"\n",
|
||||
"| [Tool calling](/docs/how_to/tool_calling) | [Structured output](/docs/how_to/structured_output/) | JSON mode | [Image input](/docs/how_to/multimodal_inputs/) | Audio input | Video input | [Token-level streaming](/docs/how_to/chat_streaming/) | Native async | [Token usage](/docs/how_to/chat_token_usage_tracking/) | [Logprobs](/docs/how_to/logprobs/) |\n",
|
||||
"| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |\n",
|
||||
"| depends | depends | depends | depends | depends | depends | ✅ | ✅ | ✅ | ✅ | \n",
|
||||
"\n",
|
||||
"Some model features, including tool calling, structured output, JSON mode and multi-modal inputs, are depending on deployed model.\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"## Setup\n",
|
||||
"\n",
|
||||
"To use ChatOCIModelDeployment you'll need to deploy a chat model with chat completion endpoint and install the `langchain-community`, `langchain-openai` and `oracle-ads` integration packages.\n",
|
||||
"\n",
|
||||
"You can easily deploy foundation models using the [AI Quick Actions](https://github.com/oracle-samples/oci-data-science-ai-samples/blob/main/ai-quick-actions/model-deployment-tips.md) on OCI Data Science Model deployment. For additional deployment examples, please visit the [Oracle GitHub samples repository](https://github.com/oracle-samples/oci-data-science-ai-samples/tree/main/ai-quick-actions).\n",
|
||||
"\n",
|
||||
"### Policies\n",
|
||||
"Make sure to have the required [policies](https://docs.oracle.com/en-us/iaas/data-science/using/model-dep-policies-auth.htm#model_dep_policies_auth__predict-endpoint) to access the OCI Data Science Model Deployment endpoint.\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Credentials\n",
|
||||
"\n",
|
||||
"You can set authentication through Oracle ADS. When you are working in OCI Data Science Notebook Session, you can leverage resource principal to access other OCI resources."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import ads\n",
|
||||
"\n",
|
||||
"# Set authentication through ads\n",
|
||||
"# Use resource principal are operating within a\n",
|
||||
"# OCI service that has resource principal based\n",
|
||||
"# authentication configured\n",
|
||||
"ads.set_auth(\"resource_principal\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Alternatively, you can configure the credentials using the following environment variables. For example, to use API key with specific profile:"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import os\n",
|
||||
"\n",
|
||||
"# Set authentication through environment variables\n",
|
||||
"# Use API Key setup when you are working from a local\n",
|
||||
"# workstation or on platform which does not support\n",
|
||||
"# resource principals.\n",
|
||||
"os.environ[\"OCI_IAM_TYPE\"] = \"api_key\"\n",
|
||||
"os.environ[\"OCI_CONFIG_PROFILE\"] = \"default\"\n",
|
||||
"os.environ[\"OCI_CONFIG_LOCATION\"] = \"~/.oci\""
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Check out [Oracle ADS docs](https://accelerated-data-science.readthedocs.io/en/latest/user_guide/cli/authentication.html) to see more options."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Installation\n",
|
||||
"\n",
|
||||
"The LangChain OCIModelDeployment integration lives in the `langchain-community` package. The following command will install `langchain-community` and the required dependencies."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"%pip install -qU langchain-community langchain-openai oracle-ads"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Instantiation\n",
|
||||
"\n",
|
||||
"You may instantiate the model with the generic `ChatOCIModelDeployment` or framework specific class like `ChatOCIModelDeploymentVLLM`.\n",
|
||||
"\n",
|
||||
"* Using `ChatOCIModelDeployment` when you need a generic entry point for deploying models. You can pass model parameters through `model_kwargs` during the instantiation of this class. This allows for flexibility and ease of configuration without needing to rely on framework-specific details."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from langchain_community.chat_models import ChatOCIModelDeployment\n",
|
||||
"\n",
|
||||
"# Create an instance of OCI Model Deployment Endpoint\n",
|
||||
"# Replace the endpoint uri with your own\n",
|
||||
"# Using generic class as entry point, you will be able\n",
|
||||
"# to pass model parameters through model_kwargs during\n",
|
||||
"# instantiation.\n",
|
||||
"chat = ChatOCIModelDeployment(\n",
|
||||
" endpoint=\"https://modeldeployment.<region>.oci.customer-oci.com/<ocid>/predict\",\n",
|
||||
" streaming=True,\n",
|
||||
" max_retries=1,\n",
|
||||
" model_kwargs={\n",
|
||||
" \"temperature\": 0.2,\n",
|
||||
" \"max_tokens\": 512,\n",
|
||||
" }, # other model params...\n",
|
||||
")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"* Using framework specific class like `ChatOCIModelDeploymentVLLM`: This is suitable when you are working with a specific framework (e.g. `vLLM`) and need to pass model parameters directly through the constructor, streamlining the setup process."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from langchain_community.chat_models import ChatOCIModelDeploymentVLLM\n",
|
||||
"\n",
|
||||
"# Create an instance of OCI Model Deployment Endpoint\n",
|
||||
"# Replace the endpoint uri with your own\n",
|
||||
"# Using framework specific class as entry point, you will\n",
|
||||
"# be able to pass model parameters in constructor.\n",
|
||||
"chat = ChatOCIModelDeploymentVLLM(\n",
|
||||
" endpoint=\"https://modeldeployment.<region>.oci.customer-oci.com/<md_ocid>/predict\",\n",
|
||||
")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Invocation"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"AIMessage(content=\"J'adore programmer.\", response_metadata={'token_usage': {'prompt_tokens': 44, 'total_tokens': 52, 'completion_tokens': 8}, 'model_name': 'odsc-llm', 'system_fingerprint': '', 'finish_reason': 'stop'}, id='run-ca145168-efa9-414c-9dd1-21d10766fdd3-0')"
|
||||
]
|
||||
},
|
||||
"execution_count": 2,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"messages = [\n",
|
||||
" (\n",
|
||||
" \"system\",\n",
|
||||
" \"You are a helpful assistant that translates English to French. Translate the user sentence.\",\n",
|
||||
" ),\n",
|
||||
" (\"human\", \"I love programming.\"),\n",
|
||||
"]\n",
|
||||
"\n",
|
||||
"ai_msg = chat.invoke(messages)\n",
|
||||
"ai_msg"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"\n",
|
||||
"J'adore programmer.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"print(ai_msg.content)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Chaining"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"AIMessage(content='Ich liebe Programmierung.', response_metadata={'token_usage': {'prompt_tokens': 38, 'total_tokens': 48, 'completion_tokens': 10}, 'model_name': 'odsc-llm', 'system_fingerprint': '', 'finish_reason': 'stop'}, id='run-5dd936b0-b97e-490e-9869-2ad3dd524234-0')"
|
||||
]
|
||||
},
|
||||
"execution_count": 4,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"from langchain_core.prompts import ChatPromptTemplate\n",
|
||||
"\n",
|
||||
"prompt = ChatPromptTemplate.from_messages(\n",
|
||||
" [\n",
|
||||
" (\n",
|
||||
" \"system\",\n",
|
||||
" \"You are a helpful assistant that translates {input_language} to {output_language}.\",\n",
|
||||
" ),\n",
|
||||
" (\"human\", \"{input}\"),\n",
|
||||
" ]\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"chain = prompt | chat\n",
|
||||
"chain.invoke(\n",
|
||||
" {\n",
|
||||
" \"input_language\": \"English\",\n",
|
||||
" \"output_language\": \"German\",\n",
|
||||
" \"input\": \"I love programming.\",\n",
|
||||
" }\n",
|
||||
")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Asynchronous calls"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 6,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"AIMessage(content='我喜欢编程', response_metadata={'token_usage': {'prompt_tokens': 37, 'total_tokens': 50, 'completion_tokens': 13}, 'model_name': 'odsc-llm', 'system_fingerprint': '', 'finish_reason': 'stop'}, id='run-a2dc9393-f269-41a4-b908-b1d8a92cf827-0')"
|
||||
]
|
||||
},
|
||||
"execution_count": 6,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"from langchain_community.chat_models import ChatOCIModelDeployment\n",
|
||||
"\n",
|
||||
"system = \"You are a helpful translator that translates {input_language} to {output_language}.\"\n",
|
||||
"human = \"{text}\"\n",
|
||||
"prompt = ChatPromptTemplate.from_messages([(\"system\", system), (\"human\", human)])\n",
|
||||
"\n",
|
||||
"chat = ChatOCIModelDeployment(\n",
|
||||
" endpoint=\"https://modeldeployment.us-ashburn-1.oci.customer-oci.com/<ocid>/predict\"\n",
|
||||
")\n",
|
||||
"chain = prompt | chat\n",
|
||||
"\n",
|
||||
"await chain.ainvoke(\n",
|
||||
" {\n",
|
||||
" \"input_language\": \"English\",\n",
|
||||
" \"output_language\": \"Chinese\",\n",
|
||||
" \"text\": \"I love programming\",\n",
|
||||
" }\n",
|
||||
")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Streaming calls"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"\n",
|
||||
"\n",
|
||||
"1. California\n",
|
||||
"2. Texas\n",
|
||||
"3. Florida\n",
|
||||
"4. New York\n",
|
||||
"5. Illinois"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"import os\n",
|
||||
"import sys\n",
|
||||
"\n",
|
||||
"from langchain_community.chat_models import ChatOCIModelDeployment\n",
|
||||
"from langchain_core.prompts import ChatPromptTemplate\n",
|
||||
"\n",
|
||||
"prompt = ChatPromptTemplate.from_messages(\n",
|
||||
" [(\"human\", \"List out the 5 states in the United State.\")]\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"chat = ChatOCIModelDeployment(\n",
|
||||
" endpoint=\"https://modeldeployment.us-ashburn-1.oci.customer-oci.com/<ocid>/predict\"\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"chain = prompt | chat\n",
|
||||
"\n",
|
||||
"for chunk in chain.stream({}):\n",
|
||||
" sys.stdout.write(chunk.content)\n",
|
||||
" sys.stdout.flush()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Structured output"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 8,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"{'setup': 'Why did the cat get stuck in the tree?',\n",
|
||||
" 'punchline': 'Because it was chasing its tail!'}"
|
||||
]
|
||||
},
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"from langchain_community.chat_models import ChatOCIModelDeployment\n",
|
||||
"from pydantic import BaseModel\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"class Joke(BaseModel):\n",
|
||||
" \"\"\"A setup to a joke and the punchline.\"\"\"\n",
|
||||
"\n",
|
||||
" setup: str\n",
|
||||
" punchline: str\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"chat = ChatOCIModelDeployment(\n",
|
||||
" endpoint=\"https://modeldeployment.us-ashburn-1.oci.customer-oci.com/<ocid>/predict\",\n",
|
||||
")\n",
|
||||
"structured_llm = chat.with_structured_output(Joke, method=\"json_mode\")\n",
|
||||
"output = structured_llm.invoke(\n",
|
||||
" \"Tell me a joke about cats, respond in JSON with `setup` and `punchline` keys\"\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"output.dict()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## API reference\n",
|
||||
"\n",
|
||||
"For comprehensive details on all features and configurations, please refer to the API reference documentation for each class:\n",
|
||||
"\n",
|
||||
"* [ChatOCIModelDeployment](https://api.python.langchain.com/en/latest/chat_models/langchain_community.chat_models.oci_data_science.ChatOCIModelDeployment.html)\n",
|
||||
"* [ChatOCIModelDeploymentVLLM](https://api.python.langchain.com/en/latest/chat_models/langchain_community.chat_models.oci_data_science.ChatOCIModelDeploymentVLLM.html)\n",
|
||||
"* [ChatOCIModelDeploymentTGI](https://api.python.langchain.com/en/latest/chat_models/langchain_community.chat_models.oci_data_science.ChatOCIModelDeploymentTGI.html)"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "langchain",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.9.18"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
@ -434,6 +434,160 @@
|
||||
"fine_tuned_model.invoke(messages)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "5d5d9793",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Multimodal Inputs\n",
|
||||
"\n",
|
||||
"OpenAI has models that support multimodal inputs. You can pass in images or audio to these models. For more information on how to do this in LangChain, head to the [multimodal inputs](/docs/how_to/multimodal_inputs) docs.\n",
|
||||
"\n",
|
||||
"You can see the list of models that support different modalities in [OpenAI's documentation](https://platform.openai.com/docs/models).\n",
|
||||
"\n",
|
||||
"At the time of this doc's writing, the main OpenAI models you would use would be:\n",
|
||||
"\n",
|
||||
"- Image inputs: `gpt-4o`, `gpt-4o-mini`\n",
|
||||
"- Audio inputs: `gpt-4o-audio-preview`\n",
|
||||
"\n",
|
||||
"For an example of passing in image inputs, see the [multimodal inputs how-to guide](/docs/how_to/multimodal_inputs).\n",
|
||||
"\n",
|
||||
"Below is an example of passing audio inputs to `gpt-4o-audio-preview`:"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 8,
|
||||
"id": "39d08780",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"\"I'm sorry, but I can't create audio content that involves yelling. Is there anything else I can help you with?\""
|
||||
]
|
||||
},
|
||||
"execution_count": 8,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"import base64\n",
|
||||
"\n",
|
||||
"from langchain_openai import ChatOpenAI\n",
|
||||
"\n",
|
||||
"llm = ChatOpenAI(\n",
|
||||
" model=\"gpt-4o-audio-preview\",\n",
|
||||
" temperature=0,\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"with open(\n",
|
||||
" \"../../../../libs/partners/openai/tests/integration_tests/chat_models/audio_input.wav\",\n",
|
||||
" \"rb\",\n",
|
||||
") as f:\n",
|
||||
" # b64 encode it\n",
|
||||
" audio = f.read()\n",
|
||||
" audio_b64 = base64.b64encode(audio).decode()\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"output_message = llm.invoke(\n",
|
||||
" [\n",
|
||||
" (\n",
|
||||
" \"human\",\n",
|
||||
" [\n",
|
||||
" {\"type\": \"text\", \"text\": \"Transcribe the following:\"},\n",
|
||||
" # the audio clip says \"I'm sorry, but I can't create...\"\n",
|
||||
" {\n",
|
||||
" \"type\": \"input_audio\",\n",
|
||||
" \"input_audio\": {\"data\": audio_b64, \"format\": \"wav\"},\n",
|
||||
" },\n",
|
||||
" ],\n",
|
||||
" ),\n",
|
||||
" ]\n",
|
||||
")\n",
|
||||
"output_message.content"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "feb4a499",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Audio Generation (Preview)\n",
|
||||
"\n",
|
||||
":::info\n",
|
||||
"Requires `langchain-openai>=0.2.3`\n",
|
||||
":::\n",
|
||||
"\n",
|
||||
"OpenAI has a new [audio generation feature](https://platform.openai.com/docs/guides/audio?audio-generation-quickstart-example=audio-out) that allows you to use audio inputs and outputs with the `gpt-4o-audio-preview` model."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"id": "f67a2cac",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from langchain_openai import ChatOpenAI\n",
|
||||
"\n",
|
||||
"llm = ChatOpenAI(\n",
|
||||
" model=\"gpt-4o-audio-preview\",\n",
|
||||
" temperature=0,\n",
|
||||
" model_kwargs={\n",
|
||||
" \"modalities\": [\"text\", \"audio\"],\n",
|
||||
" \"audio\": {\"voice\": \"alloy\", \"format\": \"wav\"},\n",
|
||||
" },\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"output_message = llm.invoke(\n",
|
||||
" [\n",
|
||||
" (\"human\", \"Are you made by OpenAI? Just answer yes or no\"),\n",
|
||||
" ]\n",
|
||||
")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "b7dd4e8b",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"`output_message.additional_kwargs['audio']` will contain a dictionary like\n",
|
||||
"```python\n",
|
||||
"{\n",
|
||||
" 'data': '<audio data b64-encoded',\n",
|
||||
" 'expires_at': 1729268602,\n",
|
||||
" 'id': 'audio_67127d6a44348190af62c1530ef0955a',\n",
|
||||
" 'transcript': 'Yes.'\n",
|
||||
"}\n",
|
||||
"```\n",
|
||||
"and the format will be what was passed in `model_kwargs['audio']['format']`.\n",
|
||||
"\n",
|
||||
"We can also pass this message with audio data back to the model as part of a message history before openai `expires_at` is reached.\n",
|
||||
"\n",
|
||||
":::note\n",
|
||||
"Output audio is stored under the `audio` key in `AIMessage.additional_kwargs`, but input content blocks are typed with an `input_audio` type and key in `HumanMessage.content` lists. \n",
|
||||
"\n",
|
||||
"For more information, see OpenAI's [audio docs](https://platform.openai.com/docs/guides/audio).\n",
|
||||
":::"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 8,
|
||||
"id": "f5ae473d",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"history = [\n",
|
||||
" (\"human\", \"Are you made by OpenAI? Just answer yes or no\"),\n",
|
||||
" output_message,\n",
|
||||
" (\"human\", \"And what is your name? Just give your name.\"),\n",
|
||||
"]\n",
|
||||
"second_output_message = llm.invoke(history)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "a796d728-971b-408b-88d5-440015bbb941",
|
||||
@ -447,7 +601,7 @@
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3 (ipykernel)",
|
||||
"display_name": ".venv",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
|
@ -19,7 +19,7 @@
|
||||
"source": [
|
||||
"# ChatSambaStudio\n",
|
||||
"\n",
|
||||
"This will help you getting started with SambaNovaCloud [chat models](/docs/concepts/#chat-models). For detailed documentation of all ChatStudio features and configurations head to the [API reference](https://api.python.langchain.com/en/latest/chat_models/langchain_community.chat_models.sambanova.ChatSambaStudio.html).\n",
|
||||
"This will help you getting started with SambaStudio [chat models](/docs/concepts/#chat-models). For detailed documentation of all ChatStudio features and configurations head to the [API reference](https://api.python.langchain.com/en/latest/chat_models/langchain_community.chat_models.sambanova.ChatSambaStudio.html).\n",
|
||||
"\n",
|
||||
"**[SambaNova](https://sambanova.ai/)'s** [SambaStudio](https://docs.sambanova.ai/sambastudio/latest/sambastudio-intro.html) SambaStudio is a rich, GUI-based platform that provides the functionality to train, deploy, and manage models in SambaNova [DataScale](https://sambanova.ai/products/datascale) systems.\n",
|
||||
"\n",
|
||||
|
@ -24,7 +24,7 @@
|
||||
"source": [
|
||||
"## Setting up\n",
|
||||
"\n",
|
||||
"Follow [instructions to set up an AWS accoung](https://docs.aws.amazon.com/athena/latest/ug/setting-up.html).\n",
|
||||
"Follow [instructions to set up an AWS account](https://docs.aws.amazon.com/athena/latest/ug/setting-up.html).\n",
|
||||
"\n",
|
||||
"Install a python library:"
|
||||
]
|
||||
|
@ -26,33 +26,32 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Setup\n",
|
||||
"\n",
|
||||
"### Credentials \n",
|
||||
"\n",
|
||||
"You will need to get your own API key. Go to [this page](https://firecrawl.dev) to learn more."
|
||||
"## Setup"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"scrolled": true
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import getpass\n",
|
||||
"import os\n",
|
||||
"\n",
|
||||
"if \"FIRECRAWL_API_KEY\" not in os.environ:\n",
|
||||
" os.environ[\"FIRECRAWL_API_KEY\"] = getpass.getpass(\"Enter your Firecrawl API key: \")"
|
||||
"pip install firecrawl-py"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Installation\n",
|
||||
"\n",
|
||||
"You will need to install both the `langchain_community` and `firecrawl-py` pacakges:"
|
||||
"## Usage"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"You will need to get your own API key. See https://firecrawl.dev"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -61,42 +60,12 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"%pip install -qU firecrawl-py==0.0.20 langchain_community"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Initialization\n",
|
||||
"\n",
|
||||
"### Modes\n",
|
||||
"\n",
|
||||
"- `scrape`: Scrape single url and return the markdown.\n",
|
||||
"- `crawl`: Crawl the url and all accessible sub pages and return the markdown for each one."
|
||||
"from langchain_community.document_loaders.firecrawl import FireCrawlLoader"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from langchain_community.document_loaders import FireCrawlLoader\n",
|
||||
"\n",
|
||||
"loader = FireCrawlLoader(url=\"https://firecrawl.dev\", mode=\"crawl\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Load"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@ -111,40 +80,14 @@
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"docs = loader.load()\n",
|
||||
"\n",
|
||||
"docs[0]"
|
||||
"loader = FireCrawlLoader(\n",
|
||||
" api_key=\"YOUR_API_KEY\", url=\"https://firecrawl.dev\", mode=\"scrape\"\n",
|
||||
")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 8,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"{'ogUrl': 'https://www.firecrawl.dev/', 'title': 'Home - Firecrawl', 'robots': 'follow, index', 'ogImage': 'https://www.firecrawl.dev/og.png?123', 'ogTitle': 'Firecrawl', 'sitemap': {'lastmod': '2024-08-12T00:28:16.681Z', 'changefreq': 'weekly'}, 'keywords': 'Firecrawl,Markdown,Data,Mendable,Langchain', 'sourceURL': 'https://www.firecrawl.dev/', 'ogSiteName': 'Firecrawl', 'description': 'Firecrawl crawls and converts any website into clean markdown.', 'ogDescription': 'Turn any website into LLM-ready data.', 'pageStatusCode': 200, 'ogLocaleAlternate': []}\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"print(docs[0].metadata)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Lazy Load\n",
|
||||
"\n",
|
||||
"You can use lazy loading to minimize memory requirements."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 9,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@ -160,39 +103,61 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 10,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"8"
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"pages"
|
||||
]
|
||||
},
|
||||
"execution_count": 10,
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"len(pages)"
|
||||
"## Modes\n",
|
||||
"\n",
|
||||
"- `scrape`: Scrape single url and return the markdown.\n",
|
||||
"- `crawl`: Crawl the url and all accessible sub pages and return the markdown for each one.\n",
|
||||
"- `map`: Maps the URL and returns a list of semantically related pages."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Crawl\n",
|
||||
"\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 11,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"Introducing [Smart Crawl!](https://www.firecrawl.dev/smart-crawl)\n",
|
||||
" Join the waitlist to turn any web\n",
|
||||
"{'ogUrl': 'https://www.firecrawl.dev/blog/introducing-fire-engine-for-firecrawl', 'title': 'Introducing Fire Engine for Firecrawl', 'robots': 'follow, index', 'ogImage': 'https://www.firecrawl.dev/images/blog/fire-engine-launch.png', 'ogTitle': 'Introducing Fire Engine for Firecrawl', 'sitemap': {'lastmod': '2024-08-06T00:00:00.000Z', 'changefreq': 'weekly'}, 'keywords': 'firecrawl,fireengine,web crawling,dashboard,web scraping,LLM,data extraction', 'sourceURL': 'https://www.firecrawl.dev/blog/introducing-fire-engine-for-firecrawl', 'ogSiteName': 'Firecrawl', 'description': 'The most scalable, reliable, and fast way to get web data for Firecrawl.', 'ogDescription': 'The most scalable, reliable, and fast way to get web data for Firecrawl.', 'pageStatusCode': 200, 'ogLocaleAlternate': []}\n"
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"loader = FireCrawlLoader(\n",
|
||||
" api_key=\"YOUR_API_KEY\",\n",
|
||||
" url=\"https://firecrawl.dev\",\n",
|
||||
" mode=\"crawl\",\n",
|
||||
")"
|
||||
]
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"scrolled": true
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"data = loader.load()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"print(pages[0].page_content[:100])\n",
|
||||
"print(pages[0].metadata)"
|
||||
@ -202,10 +167,54 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Crawler Options\n",
|
||||
"#### Crawl Options\n",
|
||||
"\n",
|
||||
"You can also pass `params` to the loader. This is a dictionary of options to pass to the crawler. See the [FireCrawl API documentation](https://github.com/mendableai/firecrawl-py) for more information.\n",
|
||||
"\n"
|
||||
"You can also pass `params` to the loader. This is a dictionary of options to pass to the crawler. See the [FireCrawl API documentation](https://github.com/mendableai/firecrawl-py) for more information."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"tags": []
|
||||
},
|
||||
"source": [
|
||||
"### Map"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"loader = FireCrawlLoader(api_key=\"YOUR_API_KEY\", url=\"firecrawl.dev\", mode=\"map\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"docs = loader.load()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"docs"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"#### Map Options\n",
|
||||
"\n",
|
||||
"You can also pass `params` to the loader. This is a dictionary of options to pass to the loader. See the [FireCrawl API documentation](https://github.com/mendableai/firecrawl-py) for more information."
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -220,7 +229,7 @@
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "langchain",
|
||||
"display_name": "Python 3 (ipykernel)",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
|
@ -22,7 +22,7 @@
|
||||
"source": [
|
||||
"## Setting up\n",
|
||||
"\n",
|
||||
"- Follow [instructions to set up an AWS accoung](https://docs.aws.amazon.com/athena/latest/ug/setting-up.html).\n",
|
||||
"- Follow [instructions to set up an AWS account](https://docs.aws.amazon.com/athena/latest/ug/setting-up.html).\n",
|
||||
"- Install the boto3 library: `pip install boto3`\n"
|
||||
]
|
||||
},
|
||||
|
@ -29,7 +29,7 @@
|
||||
"Ensure the `langchain_community` and `friendli-client` are installed.\n",
|
||||
"\n",
|
||||
"```sh\n",
|
||||
"pip install -U langchain-comminity friendli-client.\n",
|
||||
"pip install -U langchain-community friendli-client.\n",
|
||||
"```\n",
|
||||
"\n",
|
||||
"Sign in to [Friendli Suite](https://suite.friendli.ai/) to create a Personal Access Token, and set it as the `FRIENDLI_TOKEN` environment."
|
||||
|
@ -8,9 +8,11 @@
|
||||
"\n",
|
||||
"[OCI Data Science](https://docs.oracle.com/en-us/iaas/data-science/using/home.htm) is a fully managed and serverless platform for data science teams to build, train, and manage machine learning models in the Oracle Cloud Infrastructure.\n",
|
||||
"\n",
|
||||
"> For the latest updates, examples and experimental features, please see [ADS LangChain Integration](https://accelerated-data-science.readthedocs.io/en/latest/user_guide/large_language_model/langchain_models.html).\n",
|
||||
"\n",
|
||||
"This notebooks goes over how to use an LLM hosted on a [OCI Data Science Model Deployment](https://docs.oracle.com/en-us/iaas/data-science/using/model-dep-about.htm).\n",
|
||||
"\n",
|
||||
"To authenticate, [oracle-ads](https://accelerated-data-science.readthedocs.io/en/latest/user_guide/cli/authentication.html) has been used to automatically load credentials for invoking endpoint."
|
||||
"For authentication, the [oracle-ads](https://accelerated-data-science.readthedocs.io/en/latest/user_guide/cli/authentication.html) library is used to automatically load credentials required for invoking the endpoint."
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -29,29 +31,52 @@
|
||||
"## Prerequisite\n",
|
||||
"\n",
|
||||
"### Deploy model\n",
|
||||
"Check [Oracle GitHub samples repository](https://github.com/oracle-samples/oci-data-science-ai-samples/tree/main/model-deployment/containers/llama2) on how to deploy your llm on OCI Data Science Model deployment.\n",
|
||||
"You can easily deploy, fine-tune, and evaluate foundation models using the [AI Quick Actions](https://docs.oracle.com/en-us/iaas/data-science/using/ai-quick-actions.htm) on OCI Data Science Model deployment. For additional deployment examples, please visit the [Oracle GitHub samples repository](https://github.com/oracle-samples/oci-data-science-ai-samples/blob/main/ai-quick-actions/llama3-with-smc.md). \n",
|
||||
"\n",
|
||||
"### Policies\n",
|
||||
"Make sure to have the required [policies](https://docs.oracle.com/en-us/iaas/data-science/using/model-dep-policies-auth.htm#model_dep_policies_auth__predict-endpoint) to access the OCI Data Science Model Deployment endpoint.\n",
|
||||
"\n",
|
||||
"## Set up\n",
|
||||
"\n",
|
||||
"### vLLM\n",
|
||||
"After having deployed model, you have to set up following required parameters of the `OCIModelDeploymentVLLM` call:\n",
|
||||
"After having deployed model, you have to set up following required parameters of the call:\n",
|
||||
"\n",
|
||||
"- **`endpoint`**: The model HTTP endpoint from the deployed model, e.g. `https://<MD_OCID>/predict`. \n",
|
||||
"- **`model`**: The location of the model.\n",
|
||||
"- **`endpoint`**: The model HTTP endpoint from the deployed model, e.g. `https://modeldeployment.<region>.oci.customer-oci.com/<md_ocid>/predict`. \n",
|
||||
"\n",
|
||||
"### Text generation inference (TGI)\n",
|
||||
"You have to set up following required parameters of the `OCIModelDeploymentTGI` call:\n",
|
||||
"\n",
|
||||
"- **`endpoint`**: The model HTTP endpoint from the deployed model, e.g. `https://<MD_OCID>/predict`. \n",
|
||||
"\n",
|
||||
"### Authentication\n",
|
||||
"\n",
|
||||
"You can set authentication through either ads or environment variables. When you are working in OCI Data Science Notebook Session, you can leverage resource principal to access other OCI resources. Check out [here](https://accelerated-data-science.readthedocs.io/en/latest/user_guide/cli/authentication.html) to see more options. \n",
|
||||
"\n",
|
||||
"## Example"
|
||||
"## Examples"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import ads\n",
|
||||
"from langchain_community.llms import OCIModelDeploymentLLM\n",
|
||||
"\n",
|
||||
"# Set authentication through ads\n",
|
||||
"# Use resource principal are operating within a\n",
|
||||
"# OCI service that has resource principal based\n",
|
||||
"# authentication configured\n",
|
||||
"ads.set_auth(\"resource_principal\")\n",
|
||||
"\n",
|
||||
"# Create an instance of OCI Model Deployment Endpoint\n",
|
||||
"# Replace the endpoint uri and model name with your own\n",
|
||||
"# Using generic class as entry point, you will be able\n",
|
||||
"# to pass model parameters through model_kwargs during\n",
|
||||
"# instantiation.\n",
|
||||
"llm = OCIModelDeploymentLLM(\n",
|
||||
" endpoint=\"https://modeldeployment.<region>.oci.customer-oci.com/<md_ocid>/predict\",\n",
|
||||
" model=\"odsc-llm\",\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"# Run the LLM\n",
|
||||
"llm.invoke(\"Who is the first president of United States?\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -71,7 +96,11 @@
|
||||
"\n",
|
||||
"# Create an instance of OCI Model Deployment Endpoint\n",
|
||||
"# Replace the endpoint uri and model name with your own\n",
|
||||
"llm = OCIModelDeploymentVLLM(endpoint=\"https://<MD_OCID>/predict\", model=\"model_name\")\n",
|
||||
"# Using framework specific class as entry point, you will\n",
|
||||
"# be able to pass model parameters in constructor.\n",
|
||||
"llm = OCIModelDeploymentVLLM(\n",
|
||||
" endpoint=\"https://modeldeployment.<region>.oci.customer-oci.com/<md_ocid>/predict\",\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"# Run the LLM\n",
|
||||
"llm.invoke(\"Who is the first president of United States?\")"
|
||||
@ -97,14 +126,64 @@
|
||||
"\n",
|
||||
"# Set endpoint through environment variables\n",
|
||||
"# Replace the endpoint uri with your own\n",
|
||||
"os.environ[\"OCI_LLM_ENDPOINT\"] = \"https://<MD_OCID>/predict\"\n",
|
||||
"os.environ[\"OCI_LLM_ENDPOINT\"] = (\n",
|
||||
" \"https://modeldeployment.<region>.oci.customer-oci.com/<md_ocid>/predict\"\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"# Create an instance of OCI Model Deployment Endpoint\n",
|
||||
"# Using framework specific class as entry point, you will\n",
|
||||
"# be able to pass model parameters in constructor.\n",
|
||||
"llm = OCIModelDeploymentTGI()\n",
|
||||
"\n",
|
||||
"# Run the LLM\n",
|
||||
"llm.invoke(\"Who is the first president of United States?\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Asynchronous calls"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"await llm.ainvoke(\"Tell me a joke.\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Streaming calls"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"for chunk in llm.stream(\"Tell me a joke.\"):\n",
|
||||
" print(chunk, end=\"\", flush=True)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## API reference\n",
|
||||
"\n",
|
||||
"For comprehensive details on all features and configurations, please refer to the API reference documentation for each class:\n",
|
||||
"\n",
|
||||
"* [OCIModelDeploymentLLM](https://api.python.langchain.com/en/latest/llms/langchain_community.llms.oci_data_science_model_deployment_endpoint.OCIModelDeploymentLLM.html)\n",
|
||||
"* [OCIModelDeploymentVLLM](https://api.python.langchain.com/en/latest/llms/langchain_community.llms.oci_data_science_model_deployment_endpoint.OCIModelDeploymentVLLM.html)\n",
|
||||
"* [OCIModelDeploymentTGI](https://api.python.langchain.com/en/latest/llms/langchain_community.llms.oci_data_science_model_deployment_endpoint.OCIModelDeploymentTGI.html)"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
|
44
docs/docs/integrations/providers/baai.mdx
Normal file
44
docs/docs/integrations/providers/baai.mdx
Normal file
@ -0,0 +1,44 @@
|
||||
# BAAI
|
||||
|
||||
>[Beijing Academy of Artificial Intelligence (BAAI) (Wikipedia)](https://en.wikipedia.org/wiki/Beijing_Academy_of_Artificial_Intelligence),
|
||||
> also known as `Zhiyuan Institute`, is a Chinese non-profit artificial
|
||||
> intelligence (AI) research laboratory. `BAAI` conducts AI research
|
||||
> and is dedicated to promoting collaboration among academia and industry,
|
||||
> as well as fostering top talent and a focus on long-term research on
|
||||
> the fundamentals of AI technology. As a collaborative hub, BAAI's founding
|
||||
> members include leading AI companies, universities, and research institutes.
|
||||
|
||||
|
||||
## Embedding Models
|
||||
|
||||
### HuggingFaceBgeEmbeddings
|
||||
|
||||
>[BGE models on the HuggingFace](https://huggingface.co/BAAI/bge-large-en-v1.5)
|
||||
> are one of [the best open-source embedding models](https://huggingface.co/spaces/mteb/leaderboard).
|
||||
|
||||
See a [usage example](/docs/integrations/text_embedding/bge_huggingface).
|
||||
|
||||
```python
|
||||
from langchain_community.embeddings import HuggingFaceBgeEmbeddings
|
||||
```
|
||||
|
||||
### IpexLLMBgeEmbeddings
|
||||
|
||||
>[IPEX-LLM](https://github.com/intel-analytics/ipex-llm) is a PyTorch
|
||||
> library for running LLM on Intel CPU and GPU (e.g., local PC with iGPU,
|
||||
> discrete GPU such as Arc, Flex and Max) with very low latency.
|
||||
|
||||
See a [usage example running model on Intel CPU](/docs/integrations/text_embedding/ipex_llm).
|
||||
See a [usage example running model on Intel GPU](/docs/integrations/text_embedding/ipex_llm_gpu).
|
||||
|
||||
```python
|
||||
from langchain_community.embeddings import IpexLLMBgeEmbeddings
|
||||
```
|
||||
|
||||
### QuantizedBgeEmbeddings
|
||||
|
||||
See a [usage example](/docs/integrations/text_embedding/itrex).
|
||||
|
||||
```python
|
||||
from langchain_community.embeddings import QuantizedBgeEmbeddings
|
||||
```
|
@ -8,15 +8,23 @@ Get the access token.
|
||||
You can find the access instructions [here](https://open.larksuite.com/document)
|
||||
|
||||
|
||||
## Document Loader
|
||||
|
||||
### Lark Suite
|
||||
## Document Loaders
|
||||
|
||||
>[Lark Suite](https://www.larksuite.com/) is an enterprise collaboration platform
|
||||
> developed by `ByteDance`.
|
||||
|
||||
See a [usage example](/docs/integrations/document_loaders/larksuite).
|
||||
### Lark Suite for Document
|
||||
|
||||
See a [usage example](/docs/integrations/document_loaders/larksuite/#load-from-document).
|
||||
|
||||
```python
|
||||
from langchain_community.document_loaders.larksuite import LarkSuiteDocLoader
|
||||
```
|
||||
|
||||
### Lark Suite for Wiki
|
||||
|
||||
See a [usage example](/docs/integrations/document_loaders/larksuite/#load-from-wiki).
|
||||
|
||||
```python
|
||||
from langchain_community.document_loaders.larksuite import LarkSuiteWikiLoader
|
||||
```
|
||||
|
@ -113,7 +113,7 @@ See [Databricks SQL Agent](https://docs.databricks.com/en/large-language-models/
|
||||
Open Models
|
||||
-----------
|
||||
|
||||
To directly integrate Databricks's open models hosted on HuggingFace, you can use the [HuggingFace Integration](/docs/integrations/platforms/huggingface) of LangChain.
|
||||
To directly integrate Databricks's open models hosted on HuggingFace, you can use the [HuggingFace Integration](/docs/integrations/providers/huggingface) of LangChain.
|
||||
|
||||
```
|
||||
from langchain_huggingface import HuggingFaceEndpoint
|
||||
|
@ -72,7 +72,7 @@ See a [usage example](/docs/integrations/chat/google_vertex_ai_palm).
|
||||
from langchain_google_vertexai import ChatVertexAI
|
||||
```
|
||||
|
||||
### Chat Anthropic on Vertex AI Model Garden
|
||||
### Anthropic on Vertex AI Model Garden
|
||||
|
||||
See a [usage example](/docs/integrations/llms/google_vertex_ai_palm).
|
||||
|
||||
@ -80,19 +80,19 @@ See a [usage example](/docs/integrations/llms/google_vertex_ai_palm).
|
||||
from langchain_google_vertexai.model_garden import ChatAnthropicVertex
|
||||
```
|
||||
|
||||
### Chat Llama on Vertex AI Model Garden
|
||||
### Llama on Vertex AI Model Garden
|
||||
|
||||
```python
|
||||
from langchain_google_vertexai.model_garden_maas.llama import VertexModelGardenLlama
|
||||
```
|
||||
|
||||
### Chat Mistral on Vertex AI Model Garden
|
||||
### Mistral on Vertex AI Model Garden
|
||||
|
||||
```python
|
||||
from langchain_google_vertexai.model_garden_maas.mistral import VertexModelGardenMistral
|
||||
```
|
||||
|
||||
### Chat Gemma local from Hugging Face
|
||||
### Gemma local from Hugging Face
|
||||
|
||||
>Local `Gemma` model loaded from `HuggingFace`.
|
||||
|
||||
@ -106,7 +106,7 @@ pip install langchain-google-vertexai
|
||||
from langchain_google_vertexai.gemma import GemmaChatLocalHF
|
||||
```
|
||||
|
||||
### Chat Gemma local from Kaggle
|
||||
### Gemma local from Kaggle
|
||||
|
||||
>Local `Gemma` model loaded from `Kaggle`.
|
||||
|
||||
@ -120,7 +120,7 @@ pip install langchain-google-vertexai
|
||||
from langchain_google_vertexai.gemma import GemmaChatLocalKaggle
|
||||
```
|
||||
|
||||
### Chat Gemma on Vertex AI Model Garden
|
||||
### Gemma on Vertex AI Model Garden
|
||||
|
||||
We need to install `langchain-google-vertexai` python package.
|
||||
|
||||
@ -132,7 +132,7 @@ pip install langchain-google-vertexai
|
||||
from langchain_google_vertexai.gemma import GemmaChatVertexAIModelGarden
|
||||
```
|
||||
|
||||
### Vertex AI image captioning chat
|
||||
### Vertex AI image captioning
|
||||
|
||||
>Implementation of the `Image Captioning model` as a chat.
|
||||
|
||||
@ -146,7 +146,7 @@ pip install langchain-google-vertexai
|
||||
from langchain_google_vertexai.vision_models import VertexAIImageCaptioningChat
|
||||
```
|
||||
|
||||
### Vertex AI image editor chat
|
||||
### Vertex AI image editor
|
||||
|
||||
>Given an image and a prompt, edit the image. Currently only supports mask-free editing.
|
||||
|
||||
@ -160,7 +160,7 @@ pip install langchain-google-vertexai
|
||||
from langchain_google_vertexai.vision_models import VertexAIImageEditorChat
|
||||
```
|
||||
|
||||
### Vertex AI image generator chat
|
||||
### Vertex AI image generator
|
||||
|
||||
>Generates an image from a prompt.
|
||||
|
||||
@ -174,7 +174,7 @@ pip install langchain-google-vertexai
|
||||
from langchain_google_vertexai.vision_models import VertexAIImageGeneratorChat
|
||||
```
|
||||
|
||||
### Vertex AI visual QnA chat
|
||||
### Vertex AI visual QnA
|
||||
|
||||
>Chat implementation of a visual QnA model
|
||||
|
@ -1,20 +1,35 @@
|
||||
# Jina
|
||||
# Jina AI
|
||||
|
||||
This page covers how to use the Jina Embeddings within LangChain.
|
||||
It is broken into two parts: installation and setup, and then references to specific Jina wrappers.
|
||||
>[Jina AI](https://jina.ai/about-us) is a search AI company. `Jina` helps businesses and developers unlock multimodal data with a better search.
|
||||
|
||||
## Installation and Setup
|
||||
- Get a Jina AI API token from [here](https://jina.ai/embeddings/) and set it as an environment variable (`JINA_API_TOKEN`)
|
||||
|
||||
There exists a Jina Embeddings wrapper, which you can access with
|
||||
## Chat Models
|
||||
|
||||
```python
|
||||
from langchain_community.embeddings import JinaEmbeddings
|
||||
|
||||
# you can pas jina_api_key, if none is passed it will be taken from `JINA_API_TOKEN` environment variable
|
||||
embeddings = JinaEmbeddings(jina_api_key='jina_**', model_name='jina-embeddings-v2-base-en')
|
||||
from langchain_community.chat_models import JinaChat
|
||||
```
|
||||
|
||||
See a [usage examples](/docs/integrations/chat/jinachat).
|
||||
|
||||
## Embedding Models
|
||||
|
||||
You can check the list of available models from [here](https://jina.ai/embeddings/)
|
||||
|
||||
For a more detailed walkthrough of this, see [this notebook](/docs/integrations/text_embedding/jina)
|
||||
```python
|
||||
from langchain_community.embeddings import JinaEmbeddings
|
||||
```
|
||||
|
||||
See a [usage examples](/docs/integrations/text_embedding/jina).
|
||||
|
||||
## Document Transformers
|
||||
|
||||
### Jina Rerank
|
||||
|
||||
```python
|
||||
from langchain_community.document_compressors import JinaRerank
|
||||
```
|
||||
|
||||
See a [usage examples](/docs/integrations/document_transformers/jina_rerank).
|
||||
|
||||
|
20
docs/docs/integrations/providers/koboldai.mdx
Normal file
20
docs/docs/integrations/providers/koboldai.mdx
Normal file
@ -0,0 +1,20 @@
|
||||
# KoboldAI
|
||||
|
||||
>[KoboldAI](https://koboldai.com/) is a free, open-source project that allows users to run AI models locally
|
||||
> on their own computer.
|
||||
> It's a browser-based front-end that can be used for writing or role playing with an AI.
|
||||
>[KoboldAI](https://github.com/KoboldAI/KoboldAI-Client) is a "a browser-based front-end for
|
||||
> AI-assisted writing with multiple local & remote AI models...".
|
||||
> It has a public and local API that can be used in LangChain.
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
Check out the [installation guide](https://github.com/KoboldAI/KoboldAI-Client).
|
||||
|
||||
## LLMs
|
||||
|
||||
See a [usage example](/docs/integrations/llms/koboldai).
|
||||
|
||||
```python
|
||||
from langchain_community.llms import KoboldApiLLM
|
||||
```
|
21
docs/docs/integrations/providers/konlpy.mdx
Normal file
21
docs/docs/integrations/providers/konlpy.mdx
Normal file
@ -0,0 +1,21 @@
|
||||
# KoNLPY
|
||||
|
||||
>[KoNLPy](https://konlpy.org/) is a Python package for natural language processing (NLP)
|
||||
> of the Korean language.
|
||||
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
You need to install the `konlpy` python package.
|
||||
|
||||
```bash
|
||||
pip install konlpy
|
||||
```
|
||||
|
||||
## Text splitter
|
||||
|
||||
See a [usage example](/docs/how_to/split_by_token/#konlpy).
|
||||
|
||||
```python
|
||||
from langchain_text_splitters import KonlpyTextSplitter
|
||||
```
|
32
docs/docs/integrations/providers/kuzu.mdx
Normal file
32
docs/docs/integrations/providers/kuzu.mdx
Normal file
@ -0,0 +1,32 @@
|
||||
# Kùzu
|
||||
|
||||
>[Kùzu](https://kuzudb.com/) is a company based in Waterloo, Ontario, Canada.
|
||||
> It provides a highly scalable, extremely fast, easy-to-use [embeddable graph database](https://github.com/kuzudb/kuzu).
|
||||
|
||||
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
You need to install the `kuzu` python package.
|
||||
|
||||
```bash
|
||||
pip install kuzu
|
||||
```
|
||||
|
||||
## Graph database
|
||||
|
||||
See a [usage example](/docs/integrations/graphs/kuzu_db).
|
||||
|
||||
```python
|
||||
from langchain_community.graphs import KuzuGraph
|
||||
```
|
||||
|
||||
## Chain
|
||||
|
||||
See a [usage example](/docs/integrations/graphs/kuzu_db/#creating-kuzuqachain).
|
||||
|
||||
```python
|
||||
from langchain.chains import KuzuQAChain
|
||||
```
|
||||
|
||||
|
32
docs/docs/integrations/providers/llama_index.mdx
Normal file
32
docs/docs/integrations/providers/llama_index.mdx
Normal file
@ -0,0 +1,32 @@
|
||||
# LlamaIndex
|
||||
|
||||
>[LlamaIndex](https://www.llamaindex.ai/) is the leading data framework for building LLM applications
|
||||
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
You need to install the `llama-index` python package.
|
||||
|
||||
```bash
|
||||
pip install llama-index
|
||||
```
|
||||
|
||||
See the [installation instructions](https://docs.llamaindex.ai/en/stable/getting_started/installation/).
|
||||
|
||||
## Retrievers
|
||||
|
||||
### LlamaIndexRetriever
|
||||
|
||||
>It is used for the question-answering with sources over an LlamaIndex data structure.
|
||||
|
||||
```python
|
||||
from langchain_community.retrievers.llama_index import LlamaIndexRetriever
|
||||
```
|
||||
|
||||
### LlamaIndexGraphRetriever
|
||||
|
||||
>It is used for question-answering with sources over an LlamaIndex graph data structure.
|
||||
|
||||
```python
|
||||
from langchain_community.retrievers.llama_index import LlamaIndexGraphRetriever
|
||||
```
|
24
docs/docs/integrations/providers/llamaedge.mdx
Normal file
24
docs/docs/integrations/providers/llamaedge.mdx
Normal file
@ -0,0 +1,24 @@
|
||||
# LlamaEdge
|
||||
|
||||
>[LlamaEdge](https://llamaedge.com/docs/intro/) is the easiest & fastest way to run customized
|
||||
> and fine-tuned LLMs locally or on the edge.
|
||||
>
|
||||
>* Lightweight inference apps. `LlamaEdge` is in MBs instead of GBs
|
||||
>* Native and GPU accelerated performance
|
||||
>* Supports many GPU and hardware accelerators
|
||||
>* Supports many optimized inference libraries
|
||||
>* Wide selection of AI / LLM models
|
||||
|
||||
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
See the [installation instructions](https://llamaedge.com/docs/user-guide/quick-start-command).
|
||||
|
||||
## Chat models
|
||||
|
||||
See a [usage example](/docs/integrations/chat/llama_edge).
|
||||
|
||||
```python
|
||||
from langchain_community.chat_models.llama_edge import LlamaEdgeChatService
|
||||
```
|
31
docs/docs/integrations/providers/llamafile.mdx
Normal file
31
docs/docs/integrations/providers/llamafile.mdx
Normal file
@ -0,0 +1,31 @@
|
||||
# llamafile
|
||||
|
||||
>[llamafile](https://github.com/Mozilla-Ocho/llamafile) lets you distribute and run LLMs
|
||||
> with a single file.
|
||||
|
||||
>`llamafile` makes open LLMs much more accessible to both developers and end users.
|
||||
> `llamafile` is doing that by combining [llama.cpp](https://github.com/ggerganov/llama.cpp) with
|
||||
> [Cosmopolitan Libc](https://github.com/jart/cosmopolitan) into one framework that collapses
|
||||
> all the complexity of LLMs down to a single-file executable (called a "llamafile")
|
||||
> that runs locally on most computers, with no installation.
|
||||
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
See the [installation instructions](https://github.com/Mozilla-Ocho/llamafile?tab=readme-ov-file#quickstart).
|
||||
|
||||
## LLMs
|
||||
|
||||
See a [usage example](/docs/integrations/llms/llamafile).
|
||||
|
||||
```python
|
||||
from langchain_community.llms.llamafile import Llamafile
|
||||
```
|
||||
|
||||
## Embedding models
|
||||
|
||||
See a [usage example](/docs/integrations/text_embedding/llamafile).
|
||||
|
||||
```python
|
||||
from langchain_community.embeddings import LlamafileEmbeddings
|
||||
```
|
24
docs/docs/integrations/providers/localai.mdx
Normal file
24
docs/docs/integrations/providers/localai.mdx
Normal file
@ -0,0 +1,24 @@
|
||||
# LocalAI
|
||||
|
||||
>[LocalAI](https://localai.io/) is the free, Open Source OpenAI alternative.
|
||||
> `LocalAI` act as a drop-in replacement REST API that’s compatible with OpenAI API
|
||||
> specifications for local inferencing. It allows you to run LLMs, generate images,
|
||||
> audio (and not only) locally or on-prem with consumer grade hardware,
|
||||
> supporting multiple model families and architectures.
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
We have to install several python packages:
|
||||
|
||||
```bash
|
||||
pip install tenacity openai
|
||||
```
|
||||
|
||||
|
||||
## Embedding models
|
||||
|
||||
See a [usage example](/docs/integrations/text_embedding/localai).
|
||||
|
||||
```python
|
||||
from langchain_community.embeddings import LocalAIEmbeddings
|
||||
```
|
@ -264,22 +264,20 @@ See a [usage example](/docs/integrations/document_loaders/url/#playwright-url-lo
|
||||
from langchain_community.document_loaders.onenote import OneNoteLoader
|
||||
```
|
||||
|
||||
## AI Agent Memory System
|
||||
|
||||
[AI agent](https://learn.microsoft.com/en-us/azure/cosmos-db/ai-agents) needs robust memory systems that support multi-modality, offer strong operational performance, and enable agent memory sharing as well as separation.
|
||||
## Vector Stores
|
||||
|
||||
### Azure Cosmos DB
|
||||
AI agents can rely on Azure Cosmos DB as a unified [memory system](https://learn.microsoft.com/en-us/azure/cosmos-db/ai-agents#memory-can-make-or-break-agents) solution, enjoying speed, scale, and simplicity. This service successfully [enabled OpenAI's ChatGPT service](https://www.youtube.com/watch?v=6IIUtEFKJec&t) to scale dynamically with high reliability and low maintenance. Powered by an atom-record-sequence engine, it is the world's first globally distributed [NoSQL](https://learn.microsoft.com/en-us/azure/cosmos-db/distributed-nosql), [relational](https://learn.microsoft.com/en-us/azure/cosmos-db/distributed-relational), and [vector database](https://learn.microsoft.com/en-us/azure/cosmos-db/vector-database) service that offers a serverless mode.
|
||||
|
||||
Below are two available Azure Cosmos DB APIs that can provide vector store functionalities.
|
||||
|
||||
### Azure Cosmos DB for MongoDB (vCore)
|
||||
#### Azure Cosmos DB for MongoDB (vCore)
|
||||
|
||||
>[Azure Cosmos DB for MongoDB vCore](https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb/vcore/) makes it easy to create a database with full native MongoDB support.
|
||||
> You can apply your MongoDB experience and continue to use your favorite MongoDB drivers, SDKs, and tools by pointing your application to the API for MongoDB vCore account's connection string.
|
||||
> Use vector search in Azure Cosmos DB for MongoDB vCore to seamlessly integrate your AI-based applications with your data that's stored in Azure Cosmos DB.
|
||||
|
||||
#### Installation and Setup
|
||||
##### Installation and Setup
|
||||
|
||||
See [detail configuration instructions](/docs/integrations/vectorstores/azure_cosmos_db).
|
||||
|
||||
@ -289,7 +287,7 @@ We need to install `pymongo` python package.
|
||||
pip install pymongo
|
||||
```
|
||||
|
||||
#### Deploy Azure Cosmos DB on Microsoft Azure
|
||||
##### Deploy Azure Cosmos DB on Microsoft Azure
|
||||
|
||||
Azure Cosmos DB for MongoDB vCore provides developers with a fully managed MongoDB-compatible database service for building modern applications with a familiar architecture.
|
||||
|
||||
@ -303,7 +301,7 @@ See a [usage example](/docs/integrations/vectorstores/azure_cosmos_db).
|
||||
from langchain_community.vectorstores import AzureCosmosDBVectorSearch
|
||||
```
|
||||
|
||||
### Azure Cosmos DB NoSQL
|
||||
#### Azure Cosmos DB NoSQL
|
||||
|
||||
>[Azure Cosmos DB for NoSQL](https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/vector-search) now offers vector indexing and search in preview.
|
||||
This feature is designed to handle high-dimensional vectors, enabling efficient and accurate vector search at any scale. You can now store vectors
|
||||
@ -312,7 +310,7 @@ but also high-dimensional vectors as other properties of the documents. This col
|
||||
as the vectors are stored in the same logical unit as the data they represent. This simplifies data management, AI application architectures, and the
|
||||
efficiency of vector-based operations.
|
||||
|
||||
#### Installation and Setup
|
||||
##### Installation and Setup
|
||||
|
||||
See [detail configuration instructions](/docs/integrations/vectorstores/azure_cosmos_db_no_sql).
|
||||
|
||||
@ -322,7 +320,7 @@ We need to install `azure-cosmos` python package.
|
||||
pip install azure-cosmos
|
||||
```
|
||||
|
||||
#### Deploy Azure Cosmos DB on Microsoft Azure
|
||||
##### Deploy Azure Cosmos DB on Microsoft Azure
|
||||
|
||||
Azure Cosmos DB offers a solution for modern apps and intelligent workloads by being very responsive with dynamic and elastic autoscale. It is available
|
||||
in every Azure region and can automatically replicate data closer to users. It has SLA guaranteed low-latency and high availability.
|
||||
@ -336,6 +334,7 @@ from langchain_community.vectorstores import AzureCosmosDBNoSQLVectorSearch
|
||||
```
|
||||
|
||||
### Azure Database for PostgreSQL
|
||||
|
||||
>[Azure Database for PostgreSQL - Flexible Server](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/service-overview) is a relational database service based on the open-source Postgres database engine. It's a fully managed database-as-a-service that can handle mission-critical workloads with predictable performance, security, high availability, and dynamic scalability.
|
||||
|
||||
See [set up instructions](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/quickstart-create-server-portal) for Azure Database for PostgreSQL.
|
||||
@ -446,6 +445,38 @@ The `azure_ai_services` toolkit includes the following tools:
|
||||
- Text to Speech: [AzureAiServicesTextToSpeechTool](https://python.langchain.com/api_reference/community/tools/langchain_community.tools.azure_ai_services.text_to_speech.AzureAiServicesTextToSpeechTool.html)
|
||||
- Text Analytics for Health: [AzureAiServicesTextAnalyticsForHealthTool](https://python.langchain.com/api_reference/community/tools/langchain_community.tools.azure_ai_services.text_analytics_for_health.AzureAiServicesTextAnalyticsForHealthTool.html)
|
||||
|
||||
### Azure Cognitive Services
|
||||
|
||||
We need to install several python packages.
|
||||
|
||||
```bash
|
||||
pip install azure-ai-formrecognizer azure-cognitiveservices-speech azure-ai-vision-imageanalysis
|
||||
```
|
||||
|
||||
See a [usage example](/docs/integrations/tools/azure_cognitive_services).
|
||||
|
||||
```python
|
||||
from langchain_community.agent_toolkits import AzureCognitiveServicesToolkit
|
||||
```
|
||||
|
||||
#### Azure AI Services individual tools
|
||||
|
||||
The `azure_ai_services` toolkit includes the tools that queries the `Azure Cognitive Services`:
|
||||
- `AzureCogsFormRecognizerTool`: Form Recognizer API
|
||||
- `AzureCogsImageAnalysisTool`: Image Analysis API
|
||||
- `AzureCogsSpeech2TextTool`: Speech2Text API
|
||||
- `AzureCogsText2SpeechTool`: Text2Speech API
|
||||
- `AzureCogsTextAnalyticsHealthTool`: Text Analytics for Health API
|
||||
|
||||
```python
|
||||
from langchain_community.tools.azure_cognitive_services import (
|
||||
AzureCogsFormRecognizerTool,
|
||||
AzureCogsImageAnalysisTool,
|
||||
AzureCogsSpeech2TextTool,
|
||||
AzureCogsText2SpeechTool,
|
||||
AzureCogsTextAnalyticsHealthTool,
|
||||
)
|
||||
```
|
||||
|
||||
### Microsoft Office 365 email and calendar
|
||||
|
||||
@ -465,11 +496,11 @@ from langchain_community.agent_toolkits import O365Toolkit
|
||||
#### Office 365 individual tools
|
||||
|
||||
You can use individual tools from the Office 365 Toolkit:
|
||||
- `O365CreateDraftMessage`: tool for creating a draft email in Office 365
|
||||
- `O365SearchEmails`: tool for searching email messages in Office 365
|
||||
- `O365SearchEvents`: tool for searching calendar events in Office 365
|
||||
- `O365SendEvent`: tool for sending calendar events in Office 365
|
||||
- `O365SendMessage`: tool for sending an email in Office 365
|
||||
- `O365CreateDraftMessage`: creating a draft email in Office 365
|
||||
- `O365SearchEmails`: searching email messages in Office 365
|
||||
- `O365SearchEvents`: searching calendar events in Office 365
|
||||
- `O365SendEvent`: sending calendar events in Office 365
|
||||
- `O365SendMessage`: sending an email in Office 365
|
||||
|
||||
```python
|
||||
from langchain_community.tools.office365 import O365CreateDraftMessage
|
||||
@ -497,9 +528,9 @@ from langchain_community.utilities.powerbi import PowerBIDataset
|
||||
#### PowerBI individual tools
|
||||
|
||||
You can use individual tools from the Azure PowerBI Toolkit:
|
||||
- `InfoPowerBITool`: tool for getting metadata about a PowerBI Dataset
|
||||
- `ListPowerBITool`: tool for getting tables names
|
||||
- `QueryPowerBITool`: tool for querying a PowerBI Dataset
|
||||
- `InfoPowerBITool`: getting metadata about a PowerBI Dataset
|
||||
- `ListPowerBITool`: getting tables names
|
||||
- `QueryPowerBITool`: querying a PowerBI Dataset
|
||||
|
||||
```python
|
||||
from langchain_community.tools.powerbi.tool import InfoPowerBITool
|
@ -9,17 +9,25 @@
|
||||
Install the Python SDK:
|
||||
|
||||
```bash
|
||||
pip install pymilvus
|
||||
pip install langchain-milvus
|
||||
```
|
||||
|
||||
## Vector Store
|
||||
|
||||
There exists a wrapper around `Milvus` indexes, allowing you to use it as a vectorstore,
|
||||
whether for semantic search or example selection.
|
||||
See a [usage example](/docs/integrations/vectorstores/milvus).
|
||||
|
||||
To import this vectorstore:
|
||||
```python
|
||||
from langchain_community.vectorstores import Milvus
|
||||
from langchain_milvus import Milvus
|
||||
```
|
||||
|
||||
## Retrievers
|
||||
|
||||
See a [usage example](/docs/integrations/retrievers/milvus_hybrid_search).
|
||||
|
||||
To import this vectorstore:
|
||||
```python
|
||||
from langchain_milvus.retrievers import MilvusCollectionHybridSearchRetriever
|
||||
from langchain_milvus.utils.sparse import BM25SparseEmbedding
|
||||
```
|
||||
|
||||
For a more detailed walkthrough of the `Miluvs` wrapper, see [this notebook](/docs/integrations/vectorstores/milvus)
|
||||
|
24
docs/docs/integrations/providers/mongodb.mdx
Normal file
24
docs/docs/integrations/providers/mongodb.mdx
Normal file
@ -0,0 +1,24 @@
|
||||
# MongoDB
|
||||
|
||||
>[MongoDB](https://www.mongodb.com/) is a NoSQL, document-oriented
|
||||
> database that supports JSON-like documents with a dynamic schema.
|
||||
|
||||
**NOTE:**
|
||||
- See other `MongoDB` integrations on the [MongoDB Atlas page](/docs/integrations/providers/mongodb_atlas).
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
Install the Python package:
|
||||
|
||||
```bash
|
||||
pip install langchain-mongodb
|
||||
```
|
||||
|
||||
## Message Histories
|
||||
|
||||
See a [usage example](/docs/integrations/memory/mongodb_chat_message_history).
|
||||
|
||||
To import this vectorstore:
|
||||
```python
|
||||
from langchain_mongodb.chat_message_histories import MongoDBChatMessageHistory
|
||||
```
|
@ -22,10 +22,30 @@ See a [usage example](/docs/integrations/vectorstores/mongodb_atlas).
|
||||
from langchain_mongodb import MongoDBAtlasVectorSearch
|
||||
```
|
||||
|
||||
## Retrievers
|
||||
|
||||
## LLM Caches
|
||||
### Full Text Search Retriever
|
||||
|
||||
>`Hybrid Search Retriever` performs full-text searches using
|
||||
> Lucene’s standard (`BM25`) analyzer.
|
||||
|
||||
```python
|
||||
from langchain_mongodb.retrievers import MongoDBAtlasFullTextSearchRetriever
|
||||
```
|
||||
|
||||
### Hybrid Search Retriever
|
||||
|
||||
>`Hybrid Search Retriever` combines vector and full-text searches weighting
|
||||
> them the via `Reciprocal Rank Fusion` (`RRF`) algorithm.
|
||||
|
||||
```python
|
||||
from langchain_mongodb.retrievers import MongoDBAtlasHybridSearchRetriever
|
||||
```
|
||||
|
||||
## Model Caches
|
||||
|
||||
### MongoDBCache
|
||||
|
||||
An abstraction to store a simple cache in MongoDB. This does not use Semantic Caching, nor does it require an index to be made on the collection before generation.
|
||||
|
||||
To import this cache:
|
||||
|
@ -32,20 +32,18 @@ from langchain_community.embeddings import OCIGenAIEmbeddings
|
||||
> as an OCI Model Deployment Endpoint using the
|
||||
> [OCI Data Science Model Deployment Service](https://docs.oracle.com/en-us/iaas/data-science/using/model-dep-about.htm).
|
||||
|
||||
If you deployed a LLM with the VLLM or TGI framework, you can use the
|
||||
`OCIModelDeploymentVLLM` or `OCIModelDeploymentTGI` classes to interact with it.
|
||||
|
||||
To use, you should have the latest `oracle-ads` python SDK installed.
|
||||
|
||||
```bash
|
||||
pip install -U oracle-ads
|
||||
```
|
||||
|
||||
See [usage examples](/docs/integrations/llms/oci_model_deployment_endpoint).
|
||||
See [chat](/docs/integrations/chat/oci_data_science) and [complete](/docs/integrations/llms/oci_model_deployment_endpoint) usage examples.
|
||||
|
||||
|
||||
```python
|
||||
from langchain_community.llms import OCIModelDeploymentVLLM
|
||||
from langchain_community.chat_models import ChatOCIModelDeployment
|
||||
|
||||
from langchain_community.llms import OCIModelDeploymentTGI
|
||||
from langchain_community.llms import OCIModelDeploymentLLM
|
||||
```
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
"\n",
|
||||
"| Provider | Package |\n",
|
||||
"|:--------:|:-------:|\n",
|
||||
"| [Google](https://python.langchain.com/docs/integrations/platforms/google/) | [langchain-google-vertexai](https://python.langchain.com/api_reference/google_vertexai/embeddings/langchain_google_vertexai.embeddings.VertexAIEmbeddings.html) |\n",
|
||||
"| [Google](https://python.langchain.com/docs/integrations/providers/google/) | [langchain-google-vertexai](https://python.langchain.com/api_reference/google_vertexai/embeddings/langchain_google_vertexai.embeddings.VertexAIEmbeddings.html) |\n",
|
||||
"\n",
|
||||
"## Setup\n",
|
||||
"\n",
|
||||
|
@ -4,7 +4,7 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Local BGE Embeddings with IPEX-LLM on Intel CPU\n",
|
||||
"# IPEX-LLM: Local BGE Embeddings on Intel CPU\n",
|
||||
"\n",
|
||||
"> [IPEX-LLM](https://github.com/intel-analytics/ipex-llm) is a PyTorch library for running LLM on Intel CPU and GPU (e.g., local PC with iGPU, discrete GPU such as Arc, Flex and Max) with very low latency.\n",
|
||||
"\n",
|
||||
@ -92,10 +92,24 @@
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3 (ipykernel)",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.10.12"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
"nbformat_minor": 4
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Local BGE Embeddings with IPEX-LLM on Intel GPU\n",
|
||||
"# IPEX-LLM: Local BGE Embeddings on Intel GPU\n",
|
||||
"\n",
|
||||
"> [IPEX-LLM](https://github.com/intel-analytics/ipex-llm) is a PyTorch library for running LLM on Intel CPU and GPU (e.g., local PC with iGPU, discrete GPU such as Arc, Flex and Max) with very low latency.\n",
|
||||
"\n",
|
||||
@ -155,10 +155,24 @@
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3 (ipykernel)",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.10.12"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
"nbformat_minor": 4
|
||||
}
|
||||
|
@ -5,7 +5,11 @@
|
||||
"id": "1c0cf975",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Jina"
|
||||
"# Jina\n",
|
||||
"\n",
|
||||
"You can check the list of available models from [here](https://jina.ai/embeddings/).\n",
|
||||
"\n",
|
||||
"## Installation and setup"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -231,7 +235,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.9.13"
|
||||
"version": "3.10.12"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
@ -74,6 +74,24 @@
|
||||
")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"(Optional) To increase the retry time for getting a function execution response, set environment variable UC_TOOL_CLIENT_EXECUTION_TIMEOUT. Default retry time value is 120s."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import os\n",
|
||||
"\n",
|
||||
"os.environ[\"UC_TOOL_CLIENT_EXECUTION_TIMEOUT\"] = \"200\""
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
|
@ -11,6 +11,8 @@
|
||||
"\n",
|
||||
"The `Jira` toolkit allows agents to interact with a given Jira instance, performing actions such as searching for issues and creating issues, the tool wraps the atlassian-python-api library, for more see: https://atlassian-python-api.readthedocs.io/jira.html\n",
|
||||
"\n",
|
||||
"## Installation and setup\n",
|
||||
"\n",
|
||||
"To use this tool, you must first set as environment variables:\n",
|
||||
" JIRA_API_TOKEN\n",
|
||||
" JIRA_USERNAME\n",
|
||||
@ -47,7 +49,7 @@
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"%pip install -qU langchain-community"
|
||||
"%pip install -qU langchain-community langchain_openai"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -58,6 +60,13 @@
|
||||
"ExecuteTime": {
|
||||
"end_time": "2023-04-17T10:21:23.730922Z",
|
||||
"start_time": "2023-04-17T10:21:22.911233Z"
|
||||
},
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-10-02T17:40:07.356954Z",
|
||||
"iopub.status.busy": "2024-10-02T17:40:07.356792Z",
|
||||
"iopub.status.idle": "2024-10-02T17:40:07.359943Z",
|
||||
"shell.execute_reply": "2024-10-02T17:40:07.359476Z",
|
||||
"shell.execute_reply.started": "2024-10-02T17:40:07.356942Z"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
@ -72,7 +81,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"execution_count": 3,
|
||||
"id": "b3050b55",
|
||||
"metadata": {
|
||||
"ExecuteTime": {
|
||||
@ -80,6 +89,13 @@
|
||||
"start_time": "2023-04-17T10:22:42.499447Z"
|
||||
},
|
||||
"collapsed": false,
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-10-02T17:40:16.201684Z",
|
||||
"iopub.status.busy": "2024-10-02T17:40:16.200922Z",
|
||||
"iopub.status.idle": "2024-10-02T17:40:16.208035Z",
|
||||
"shell.execute_reply": "2024-10-02T17:40:16.207564Z",
|
||||
"shell.execute_reply.started": "2024-10-02T17:40:16.201634Z"
|
||||
},
|
||||
"jupyter": {
|
||||
"outputs_hidden": false
|
||||
}
|
||||
@ -93,6 +109,74 @@
|
||||
"os.environ[\"JIRA_CLOUD\"] = \"True\""
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"id": "c0768000-227b-4aa1-a838-4befbdefadb1",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-10-02T17:42:00.792867Z",
|
||||
"iopub.status.busy": "2024-10-02T17:42:00.792365Z",
|
||||
"iopub.status.idle": "2024-10-02T17:42:00.816979Z",
|
||||
"shell.execute_reply": "2024-10-02T17:42:00.816419Z",
|
||||
"shell.execute_reply.started": "2024-10-02T17:42:00.792827Z"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"llm = OpenAI(temperature=0)\n",
|
||||
"jira = JiraAPIWrapper()\n",
|
||||
"toolkit = JiraToolkit.from_jira_api_wrapper(jira)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "961b3187-daf0-4907-9cc0-a69796fba4aa",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Tool usage\n",
|
||||
"\n",
|
||||
"Let's see what individual tools are in the Jira toolkit:"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"id": "eb5cf521-9a91-44bc-b68e-bc4067d05a76",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-10-02T17:42:27.232022Z",
|
||||
"iopub.status.busy": "2024-10-02T17:42:27.231140Z",
|
||||
"iopub.status.idle": "2024-10-02T17:42:27.240169Z",
|
||||
"shell.execute_reply": "2024-10-02T17:42:27.239693Z",
|
||||
"shell.execute_reply.started": "2024-10-02T17:42:27.231949Z"
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"[('JQL Query',\n",
|
||||
" '\\n This tool is a wrapper around atlassian-python-api\\'s Jira jql API, useful when you need to search for Jira issues.\\n The input to this tool is a JQL query string, and will be passed into atlassian-python-api\\'s Jira `jql` function,\\n For example, to find all the issues in project \"Test\" assigned to the me, you would pass in the following string:\\n project = Test AND assignee = currentUser()\\n or to find issues with summaries that contain the word \"test\", you would pass in the following string:\\n summary ~ \\'test\\'\\n '),\n",
|
||||
" ('Get Projects',\n",
|
||||
" \"\\n This tool is a wrapper around atlassian-python-api's Jira project API, \\n useful when you need to fetch all the projects the user has access to, find out how many projects there are, or as an intermediary step that involv searching by projects. \\n there is no input to this tool.\\n \"),\n",
|
||||
" ('Create Issue',\n",
|
||||
" '\\n This tool is a wrapper around atlassian-python-api\\'s Jira issue_create API, useful when you need to create a Jira issue. \\n The input to this tool is a dictionary specifying the fields of the Jira issue, and will be passed into atlassian-python-api\\'s Jira `issue_create` function.\\n For example, to create a low priority task called \"test issue\" with description \"test description\", you would pass in the following dictionary: \\n {{\"summary\": \"test issue\", \"description\": \"test description\", \"issuetype\": {{\"name\": \"Task\"}}, \"priority\": {{\"name\": \"Low\"}}}}\\n '),\n",
|
||||
" ('Catch all Jira API call',\n",
|
||||
" '\\n This tool is a wrapper around atlassian-python-api\\'s Jira API.\\n There are other dedicated tools for fetching all projects, and creating and searching for issues, \\n use this tool if you need to perform any other actions allowed by the atlassian-python-api Jira API.\\n The input to this tool is a dictionary specifying a function from atlassian-python-api\\'s Jira API, \\n as well as a list of arguments and dictionary of keyword arguments to pass into the function.\\n For example, to get all the users in a group, while increasing the max number of results to 100, you would\\n pass in the following dictionary: {{\"function\": \"get_all_users_from_group\", \"args\": [\"group\"], \"kwargs\": {{\"limit\":100}} }}\\n or to find out how many projects are in the Jira instance, you would pass in the following string:\\n {{\"function\": \"projects\"}}\\n For more information on the Jira API, refer to https://atlassian-python-api.readthedocs.io/jira.html\\n '),\n",
|
||||
" ('Create confluence page',\n",
|
||||
" 'This tool is a wrapper around atlassian-python-api\\'s Confluence \\natlassian-python-api API, useful when you need to create a Confluence page. The input to this tool is a dictionary \\nspecifying the fields of the Confluence page, and will be passed into atlassian-python-api\\'s Confluence `create_page` \\nfunction. For example, to create a page in the DEMO space titled \"This is the title\" with body \"This is the body. You can use \\n<strong>HTML tags</strong>!\", you would pass in the following dictionary: {{\"space\": \"DEMO\", \"title\":\"This is the \\ntitle\",\"body\":\"This is the body. You can use <strong>HTML tags</strong>!\"}} ')]"
|
||||
]
|
||||
},
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"[(tool.name, tool.description) for tool in toolkit.get_tools()]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
@ -105,9 +189,6 @@
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"llm = OpenAI(temperature=0)\n",
|
||||
"jira = JiraAPIWrapper()\n",
|
||||
"toolkit = JiraToolkit.from_jira_api_wrapper(jira)\n",
|
||||
"agent = initialize_agent(\n",
|
||||
" toolkit.get_tools(), llm, agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION, verbose=True\n",
|
||||
")"
|
||||
|
@ -35,9 +35,16 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"execution_count": 2,
|
||||
"id": "ff988466-c389-4ec6-b6ac-14364a537fd5",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-10-02T17:52:40.107644Z",
|
||||
"iopub.status.busy": "2024-10-02T17:52:40.107485Z",
|
||||
"iopub.status.idle": "2024-10-02T17:52:40.110169Z",
|
||||
"shell.execute_reply": "2024-10-02T17:52:40.109841Z",
|
||||
"shell.execute_reply.started": "2024-10-02T17:52:40.107633Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [],
|
||||
@ -50,16 +57,23 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"execution_count": 4,
|
||||
"id": "9ecd1ba0-3937-4359-a41e-68605f0596a1",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-10-02T17:59:54.134295Z",
|
||||
"iopub.status.busy": "2024-10-02T17:59:54.134138Z",
|
||||
"iopub.status.idle": "2024-10-02T17:59:54.137250Z",
|
||||
"shell.execute_reply": "2024-10-02T17:59:54.136636Z",
|
||||
"shell.execute_reply.started": "2024-10-02T17:59:54.134283Z"
|
||||
},
|
||||
"tags": []
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"with open(\"openai_openapi.yml\") as f:\n",
|
||||
" data = yaml.load(f, Loader=yaml.FullLoader)\n",
|
||||
"json_spec = JsonSpec(dict_=data, max_value_length=4000)\n",
|
||||
"json_spec = JsonSpec(dict_={}, max_value_length=4000)\n",
|
||||
"json_toolkit = JsonToolkit(spec=json_spec)\n",
|
||||
"\n",
|
||||
"json_agent_executor = create_json_agent(\n",
|
||||
@ -67,6 +81,48 @@
|
||||
")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "910eccbc-9d42-49b6-a4ca-1fbc418fcee7",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Individual tools\n",
|
||||
"\n",
|
||||
"Let's see what individual tools are inside the Jira toolkit."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"id": "b16a3ee5-ca16-452e-993f-c27228b945ac",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2024-10-02T18:00:30.527665Z",
|
||||
"iopub.status.busy": "2024-10-02T18:00:30.527053Z",
|
||||
"iopub.status.idle": "2024-10-02T18:00:30.538483Z",
|
||||
"shell.execute_reply": "2024-10-02T18:00:30.537672Z",
|
||||
"shell.execute_reply.started": "2024-10-02T18:00:30.527626Z"
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"[('json_spec_list_keys',\n",
|
||||
" '\\n Can be used to list all keys at a given path. \\n Before calling this you should be SURE that the path to this exists.\\n The input is a text representation of the path to the dict in Python syntax (e.g. data[\"key1\"][0][\"key2\"]).\\n '),\n",
|
||||
" ('json_spec_get_value',\n",
|
||||
" '\\n Can be used to see value in string format at a given path.\\n Before calling this you should be SURE that the path to this exists.\\n The input is a text representation of the path to the dict in Python syntax (e.g. data[\"key1\"][0][\"key2\"]).\\n ')]"
|
||||
]
|
||||
},
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"[(el.name, el.description) for el in json_toolkit.get_tools()]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "05cfcb24-4389-4b8f-ad9e-466e3fca8db0",
|
||||
|
@ -176,7 +176,7 @@
|
||||
"id": "f8014c9d",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Now, we can initalize the agent with the LLM, the prompt, and the tools. The agent is responsible for taking in input and deciding what actions to take. Crucially, the Agent does not execute those actions - that is done by the AgentExecutor (next step). For more information about how to think about these components, see our [conceptual guide](/docs/concepts#agents)"
|
||||
"Now, we can initialize the agent with the LLM, the prompt, and the tools. The agent is responsible for taking in input and deciding what actions to take. Crucially, the Agent does not execute those actions - that is done by the AgentExecutor (next step). For more information about how to think about these components, see our [conceptual guide](/docs/concepts#agents)"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -209,15 +209,25 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "5f5751e3-2e98-485f-8164-db8094039c25",
|
||||
"id": "4e3fd064-aa86-448d-8db3-3c55eaa5bc15",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"API references:\n",
|
||||
"\n",
|
||||
"- [QuerySQLDataBaseTool](https://python.langchain.com/api_reference/community/tools/langchain_community.tools.sql_database.tool.QuerySQLDataBaseTool.html)\n",
|
||||
"- [InfoSQLDatabaseTool](https://python.langchain.com/api_reference/community/tools/langchain_community.tools.sql_database.tool.InfoSQLDatabaseTool.html)\n",
|
||||
"- [ListSQLDatabaseTool](https://python.langchain.com/api_reference/community/tools/langchain_community.tools.sql_database.tool.ListSQLDatabaseTool.html)\n",
|
||||
"- [QuerySQLCheckerTool](https://python.langchain.com/api_reference/community/tools/langchain_community.tools.sql_database.tool.QuerySQLCheckerTool.html)"
|
||||
"You can use the individual tools directly:"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "7fa8d00c-750c-4803-9b66-057d12b26b06",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from langchain_community.tools.sql_database.tool import (\n",
|
||||
" InfoSQLDatabaseTool,\n",
|
||||
" ListSQLDatabaseTool,\n",
|
||||
" QuerySQLCheckerTool,\n",
|
||||
" QuerySQLDataBaseTool,\n",
|
||||
")"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -604,7 +614,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.10.4"
|
||||
"version": "3.10.12"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
@ -8,7 +8,7 @@ sidebar_class_name: hidden
|
||||
**LangChain** is a framework for developing applications powered by large language models (LLMs).
|
||||
|
||||
LangChain simplifies every stage of the LLM application lifecycle:
|
||||
- **Development**: Build your applications using LangChain's open-source [building blocks](/docs/concepts#langchain-expression-language-lcel), [components](/docs/concepts), and [third-party integrations](/docs/integrations/platforms/).
|
||||
- **Development**: Build your applications using LangChain's open-source [building blocks](/docs/concepts#langchain-expression-language-lcel), [components](/docs/concepts), and [third-party integrations](/docs/integrations/providers/).
|
||||
Use [LangGraph](/docs/concepts/#langgraph) to build stateful agents with first-class streaming and human-in-the-loop support.
|
||||
- **Productionization**: Use [LangSmith](https://docs.smith.langchain.com/) to inspect, monitor and evaluate your chains, so that you can continuously optimize and deploy with confidence.
|
||||
- **Deployment**: Turn your LangGraph applications into production-ready APIs and Assistants with [LangGraph Cloud](https://langchain-ai.github.io/langgraph/cloud/).
|
||||
|
@ -6,7 +6,7 @@ LangChain has a large ecosystem of integrations with various external resources
|
||||
|
||||
When building such applications developers should remember to follow good security practices:
|
||||
|
||||
* [**Limit Permissions**](https://en.wikipedia.org/wiki/Principle_of_least_privilege): Scope permissions specifically to the application's need. Granting broad or excessive permissions can introduce significant security vulnerabilities. To avoid such vulnerabilities, consider using read-only credentials, disallowing access to sensitive resources, using sandboxing techniques (such as running inside a container), etc. as appropriate for your application.
|
||||
* [**Limit Permissions**](https://en.wikipedia.org/wiki/Principle_of_least_privilege): Scope permissions specifically to the application's need. Granting broad or excessive permissions can introduce significant security vulnerabilities. To avoid such vulnerabilities, consider using read-only credentials, disallowing access to sensitive resources, using sandboxing techniques (such as running inside a container), specifying proxy configurations to control external requests, etc. as appropriate for your application.
|
||||
* **Anticipate Potential Misuse**: Just as humans can err, so can Large Language Models (LLMs). Always assume that any system access or credentials may be used in any way allowed by the permissions they are assigned. For example, if a pair of database credentials allows deleting data, it’s safest to assume that any LLM able to use those credentials may in fact delete data.
|
||||
* [**Defense in Depth**](https://en.wikipedia.org/wiki/Defense_in_depth_(computing)): No security technique is perfect. Fine-tuning and good chain design can reduce, but not eliminate, the odds that a Large Language Model (LLM) may make a mistake. It’s best to combine multiple layered security approaches rather than relying on any single layer of defense to ensure security. For example: use both read-only permissions and sandboxing to ensure that LLMs are only able to access data that is explicitly meant for them to use.
|
||||
|
||||
|
14
docs/docs/troubleshooting/errors/INVALID_PROMPT_INPUT.mdx
Normal file
14
docs/docs/troubleshooting/errors/INVALID_PROMPT_INPUT.mdx
Normal file
@ -0,0 +1,14 @@
|
||||
# INVALID_PROMPT_INPUT
|
||||
|
||||
A [prompt template](/docs/concepts#prompt-templates) received missing or invalid input variables.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
The following may help resolve this error:
|
||||
|
||||
- Double-check your prompt template to ensure that it is correct.
|
||||
- If you are using the default f-string format and you are using curly braces `{` anywhere in your template, they should be double escaped like this: `{{` (and if you want to render a double curly brace, you should use four curly braces: `{{{{`).
|
||||
- If you are using a [`MessagesPlaceholder`](/docs/concepts/#messagesplaceholder), make sure that you are passing in an array of messages or message-like objects.
|
||||
- If you are using shorthand tuples to declare your prompt template, make sure that the variable name is wrapped in curly braces (`["placeholder", "{messages}"]`).
|
||||
- Try viewing the inputs into your prompt template using [LangSmith](https://docs.smith.langchain.com/) or log statements to confirm they appear as expected.
|
||||
- If you are pulling a prompt from the [LangChain Prompt Hub](https://smith.langchain.com/prompts), try pulling and logging it or running it in isolation with a sample input to confirm that it is what you expect.
|
272
docs/docs/troubleshooting/errors/INVALID_TOOL_RESULTS.ipynb
Normal file
272
docs/docs/troubleshooting/errors/INVALID_TOOL_RESULTS.ipynb
Normal file
File diff suppressed because one or more lines are too long
122
docs/docs/troubleshooting/errors/MESSAGE_COERCION_FAILURE.ipynb
Normal file
122
docs/docs/troubleshooting/errors/MESSAGE_COERCION_FAILURE.ipynb
Normal file
@ -0,0 +1,122 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# MESSAGE_COERCION_FAILURE\n",
|
||||
"\n",
|
||||
"Instead of always requiring instances of `BaseMessage`, several modules in LangChain take `MessageLikeRepresentation`, which is defined as:"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from typing import Union\n",
|
||||
"\n",
|
||||
"from langchain_core.prompts.chat import (\n",
|
||||
" BaseChatPromptTemplate,\n",
|
||||
" BaseMessage,\n",
|
||||
" BaseMessagePromptTemplate,\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"MessageLikeRepresentation = Union[\n",
|
||||
" Union[BaseMessagePromptTemplate, BaseMessage, BaseChatPromptTemplate],\n",
|
||||
" tuple[\n",
|
||||
" Union[str, type],\n",
|
||||
" Union[str, list[dict], list[object]],\n",
|
||||
" ],\n",
|
||||
" str,\n",
|
||||
"]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"These include OpenAI style message objects (`{ role: \"user\", content: \"Hello world!\" }`),\n",
|
||||
"tuples, and plain strings (which are converted to [`HumanMessages`](/docs/concepts#humanmessage)).\n",
|
||||
"\n",
|
||||
"If one of these modules receives a value outside of one of these formats, you will receive an error like the following:"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"ename": "ValueError",
|
||||
"evalue": "Message dict must contain 'role' and 'content' keys, got {'role': 'HumanMessage', 'random_field': 'random value'}",
|
||||
"output_type": "error",
|
||||
"traceback": [
|
||||
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
||||
"\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)",
|
||||
"File \u001b[0;32m~/langchain/oss-py/libs/core/langchain_core/messages/utils.py:318\u001b[0m, in \u001b[0;36m_convert_to_message\u001b[0;34m(message)\u001b[0m\n\u001b[1;32m 317\u001b[0m \u001b[38;5;66;03m# None msg content is not allowed\u001b[39;00m\n\u001b[0;32m--> 318\u001b[0m msg_content \u001b[38;5;241m=\u001b[39m \u001b[43mmsg_kwargs\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mpop\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mcontent\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 319\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mKeyError\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m e:\n",
|
||||
"\u001b[0;31mKeyError\u001b[0m: 'content'",
|
||||
"\nThe above exception was the direct cause of the following exception:\n",
|
||||
"\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)",
|
||||
"Cell \u001b[0;32mIn[5], line 10\u001b[0m\n\u001b[1;32m 3\u001b[0m uncoercible_message \u001b[38;5;241m=\u001b[39m {\n\u001b[1;32m 4\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mrole\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mHumanMessage\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m 5\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mrandom_field\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mrandom value\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 6\u001b[0m }\n\u001b[1;32m 8\u001b[0m model \u001b[38;5;241m=\u001b[39m ChatAnthropic(model\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mclaude-3-5-sonnet-20240620\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[0;32m---> 10\u001b[0m \u001b[43mmodel\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43minvoke\u001b[49m\u001b[43m(\u001b[49m\u001b[43m[\u001b[49m\u001b[43muncoercible_message\u001b[49m\u001b[43m]\u001b[49m\u001b[43m)\u001b[49m\n",
|
||||
"File \u001b[0;32m~/langchain/oss-py/libs/core/langchain_core/language_models/chat_models.py:287\u001b[0m, in \u001b[0;36mBaseChatModel.invoke\u001b[0;34m(self, input, config, stop, **kwargs)\u001b[0m\n\u001b[1;32m 275\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21minvoke\u001b[39m(\n\u001b[1;32m 276\u001b[0m \u001b[38;5;28mself\u001b[39m,\n\u001b[1;32m 277\u001b[0m \u001b[38;5;28minput\u001b[39m: LanguageModelInput,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 281\u001b[0m \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs: Any,\n\u001b[1;32m 282\u001b[0m ) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m BaseMessage:\n\u001b[1;32m 283\u001b[0m config \u001b[38;5;241m=\u001b[39m ensure_config(config)\n\u001b[1;32m 284\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m cast(\n\u001b[1;32m 285\u001b[0m ChatGeneration,\n\u001b[1;32m 286\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mgenerate_prompt(\n\u001b[0;32m--> 287\u001b[0m [\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_convert_input\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43minput\u001b[39;49m\u001b[43m)\u001b[49m],\n\u001b[1;32m 288\u001b[0m stop\u001b[38;5;241m=\u001b[39mstop,\n\u001b[1;32m 289\u001b[0m callbacks\u001b[38;5;241m=\u001b[39mconfig\u001b[38;5;241m.\u001b[39mget(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcallbacks\u001b[39m\u001b[38;5;124m\"\u001b[39m),\n\u001b[1;32m 290\u001b[0m tags\u001b[38;5;241m=\u001b[39mconfig\u001b[38;5;241m.\u001b[39mget(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtags\u001b[39m\u001b[38;5;124m\"\u001b[39m),\n\u001b[1;32m 291\u001b[0m metadata\u001b[38;5;241m=\u001b[39mconfig\u001b[38;5;241m.\u001b[39mget(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mmetadata\u001b[39m\u001b[38;5;124m\"\u001b[39m),\n\u001b[1;32m 292\u001b[0m run_name\u001b[38;5;241m=\u001b[39mconfig\u001b[38;5;241m.\u001b[39mget(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mrun_name\u001b[39m\u001b[38;5;124m\"\u001b[39m),\n\u001b[1;32m 293\u001b[0m run_id\u001b[38;5;241m=\u001b[39mconfig\u001b[38;5;241m.\u001b[39mpop(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mrun_id\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;28;01mNone\u001b[39;00m),\n\u001b[1;32m 294\u001b[0m \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs,\n\u001b[1;32m 295\u001b[0m )\u001b[38;5;241m.\u001b[39mgenerations[\u001b[38;5;241m0\u001b[39m][\u001b[38;5;241m0\u001b[39m],\n\u001b[1;32m 296\u001b[0m )\u001b[38;5;241m.\u001b[39mmessage\n",
|
||||
"File \u001b[0;32m~/langchain/oss-py/libs/core/langchain_core/language_models/chat_models.py:267\u001b[0m, in \u001b[0;36mBaseChatModel._convert_input\u001b[0;34m(self, input)\u001b[0m\n\u001b[1;32m 265\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m StringPromptValue(text\u001b[38;5;241m=\u001b[39m\u001b[38;5;28minput\u001b[39m)\n\u001b[1;32m 266\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(\u001b[38;5;28minput\u001b[39m, Sequence):\n\u001b[0;32m--> 267\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m ChatPromptValue(messages\u001b[38;5;241m=\u001b[39m\u001b[43mconvert_to_messages\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43minput\u001b[39;49m\u001b[43m)\u001b[49m)\n\u001b[1;32m 268\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 269\u001b[0m msg \u001b[38;5;241m=\u001b[39m (\n\u001b[1;32m 270\u001b[0m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mInvalid input type \u001b[39m\u001b[38;5;132;01m{\u001b[39;00m\u001b[38;5;28mtype\u001b[39m(\u001b[38;5;28minput\u001b[39m)\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m. \u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 271\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mMust be a PromptValue, str, or list of BaseMessages.\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 272\u001b[0m )\n",
|
||||
"File \u001b[0;32m~/langchain/oss-py/libs/core/langchain_core/messages/utils.py:348\u001b[0m, in \u001b[0;36mconvert_to_messages\u001b[0;34m(messages)\u001b[0m\n\u001b[1;32m 346\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(messages, PromptValue):\n\u001b[1;32m 347\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m messages\u001b[38;5;241m.\u001b[39mto_messages()\n\u001b[0;32m--> 348\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43m[\u001b[49m\u001b[43m_convert_to_message\u001b[49m\u001b[43m(\u001b[49m\u001b[43mm\u001b[49m\u001b[43m)\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mfor\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[43mm\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;129;43;01min\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[43mmessages\u001b[49m\u001b[43m]\u001b[49m\n",
|
||||
"File \u001b[0;32m~/langchain/oss-py/libs/core/langchain_core/messages/utils.py:348\u001b[0m, in \u001b[0;36m<listcomp>\u001b[0;34m(.0)\u001b[0m\n\u001b[1;32m 346\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(messages, PromptValue):\n\u001b[1;32m 347\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m messages\u001b[38;5;241m.\u001b[39mto_messages()\n\u001b[0;32m--> 348\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m [\u001b[43m_convert_to_message\u001b[49m\u001b[43m(\u001b[49m\u001b[43mm\u001b[49m\u001b[43m)\u001b[49m \u001b[38;5;28;01mfor\u001b[39;00m m \u001b[38;5;129;01min\u001b[39;00m messages]\n",
|
||||
"File \u001b[0;32m~/langchain/oss-py/libs/core/langchain_core/messages/utils.py:321\u001b[0m, in \u001b[0;36m_convert_to_message\u001b[0;34m(message)\u001b[0m\n\u001b[1;32m 319\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mKeyError\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m e:\n\u001b[1;32m 320\u001b[0m msg \u001b[38;5;241m=\u001b[39m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mMessage dict must contain \u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mrole\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m and \u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mcontent\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m keys, got \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mmessage\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m--> 321\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(msg) \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01me\u001b[39;00m\n\u001b[1;32m 322\u001b[0m _message \u001b[38;5;241m=\u001b[39m _create_message_from_message_type(\n\u001b[1;32m 323\u001b[0m msg_type, msg_content, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mmsg_kwargs\n\u001b[1;32m 324\u001b[0m )\n\u001b[1;32m 325\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n",
|
||||
"\u001b[0;31mValueError\u001b[0m: Message dict must contain 'role' and 'content' keys, got {'role': 'HumanMessage', 'random_field': 'random value'}"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"from langchain_anthropic import ChatAnthropic\n",
|
||||
"\n",
|
||||
"uncoercible_message = {\"role\": \"HumanMessage\", \"random_field\": \"random value\"}\n",
|
||||
"\n",
|
||||
"model = ChatAnthropic(model=\"claude-3-5-sonnet-20240620\")\n",
|
||||
"\n",
|
||||
"model.invoke([uncoercible_message])"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Troubleshooting\n",
|
||||
"\n",
|
||||
"The following may help resolve this error:\n",
|
||||
"\n",
|
||||
"- Ensure that all inputs to chat models are an array of LangChain message classes or a supported message-like.\n",
|
||||
" - Check that there is no stringification or other unexpected transformation occuring.\n",
|
||||
"- Check the error's stack trace and add log or debugger statements."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": ".venv",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.11.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
18
docs/docs/troubleshooting/errors/MODEL_AUTHENTICATION.mdx
Normal file
18
docs/docs/troubleshooting/errors/MODEL_AUTHENTICATION.mdx
Normal file
@ -0,0 +1,18 @@
|
||||
# MODEL_AUTHENTICATION
|
||||
|
||||
Your model provider is denying you access to their service.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
The following may help resolve this error:
|
||||
|
||||
- Confirm that your API key or other credentials are correct.
|
||||
- If you are relying on an environment variable to authenticate, confirm that the variable name is correct and that it has a value set.
|
||||
- Note that environment variables can also be set by packages like `dotenv`.
|
||||
- For models, you can try explicitly passing an `api_key` parameter to rule out any environment variable issues like this:
|
||||
|
||||
```python
|
||||
model = ChatOpenAI(api_key="YOUR_KEY_HERE")
|
||||
```
|
||||
|
||||
- If you are using a proxy or other custom endpoint, make sure that your custom provider does not expect an alternative authentication scheme.
|
10
docs/docs/troubleshooting/errors/MODEL_NOT_FOUND.mdx
Normal file
10
docs/docs/troubleshooting/errors/MODEL_NOT_FOUND.mdx
Normal file
@ -0,0 +1,10 @@
|
||||
# MODEL_NOT_FOUND
|
||||
|
||||
The model name you have specified is not acknowledged by your provider.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
The following may help resolve this error:
|
||||
|
||||
- Double check the model string you are passing in.
|
||||
- If you are using a proxy or other alternative host with a model wrapper, confirm that the permitted model names are not restricted or altered.
|
13
docs/docs/troubleshooting/errors/MODEL_RATE_LIMIT.mdx
Normal file
13
docs/docs/troubleshooting/errors/MODEL_RATE_LIMIT.mdx
Normal file
@ -0,0 +1,13 @@
|
||||
# MODEL_RATE_LIMIT
|
||||
|
||||
You have hit the maximum number of requests that a model provider allows over a given time period and are being temporarily blocked.
|
||||
Generally, this error is temporary and your limit will reset after a certain amount of time.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
The following may help resolve this error:
|
||||
|
||||
- Contact your model provider and ask for a rate limit increase.
|
||||
- If many of your incoming requests are the same, utilize [model response caching](/docs/how_to/chat_model_caching/).
|
||||
- Spread requests across different providers if your application allows it.
|
||||
- Use a [`rate_limiter`](/docs/how_to/chat_model_rate_limiting/) to control the rate of requests to the model.
|
126
docs/docs/troubleshooting/errors/OUTPUT_PARSING_FAILURE.ipynb
Normal file
126
docs/docs/troubleshooting/errors/OUTPUT_PARSING_FAILURE.ipynb
Normal file
@ -0,0 +1,126 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# OUTPUT_PARSING_FAILURE\n",
|
||||
"\n",
|
||||
"An [output parser](/docs/concepts#output-parsers) was unable to handle model output as expected.\n",
|
||||
"\n",
|
||||
"To illustrate this, let's say you have an output parser that expects a chat model to output JSON surrounded by a markdown code tag (triple backticks). Here would be an example of good input:"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"{'foo': 'bar'}"
|
||||
]
|
||||
},
|
||||
"execution_count": 2,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"from langchain_core.messages import AIMessage\n",
|
||||
"from langchain_core.output_parsers import JsonOutputParser\n",
|
||||
"\n",
|
||||
"message = AIMessage(content='```\\n{\"foo\": \"bar\"}\\n```')\n",
|
||||
"output_parser = JsonOutputParser()\n",
|
||||
"output_parser.invoke(message)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Internally, our JSON parser stripped out the markdown fence and newlines and then ran `json.loads`.\n",
|
||||
"\n",
|
||||
"If instead the chat model generated an output with malformed JSON, we will get an error:"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 9,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"ename": "OutputParserException",
|
||||
"evalue": "Invalid json output: ```\n{{\"foo\":\n```",
|
||||
"output_type": "error",
|
||||
"traceback": [
|
||||
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
||||
"\u001b[0;31mJSONDecodeError\u001b[0m Traceback (most recent call last)",
|
||||
"File \u001b[0;32m~/langchain/oss-py/libs/core/langchain_core/output_parsers/json.py:83\u001b[0m, in \u001b[0;36mJsonOutputParser.parse_result\u001b[0;34m(self, result, partial)\u001b[0m\n\u001b[1;32m 82\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m---> 83\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mparse_json_markdown\u001b[49m\u001b[43m(\u001b[49m\u001b[43mtext\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 84\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m JSONDecodeError \u001b[38;5;28;01mas\u001b[39;00m e:\n",
|
||||
"File \u001b[0;32m~/langchain/oss-py/libs/core/langchain_core/utils/json.py:144\u001b[0m, in \u001b[0;36mparse_json_markdown\u001b[0;34m(json_string, parser)\u001b[0m\n\u001b[1;32m 143\u001b[0m json_str \u001b[38;5;241m=\u001b[39m json_string \u001b[38;5;28;01mif\u001b[39;00m match \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;28;01melse\u001b[39;00m match\u001b[38;5;241m.\u001b[39mgroup(\u001b[38;5;241m2\u001b[39m)\n\u001b[0;32m--> 144\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43m_parse_json\u001b[49m\u001b[43m(\u001b[49m\u001b[43mjson_str\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mparser\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mparser\u001b[49m\u001b[43m)\u001b[49m\n",
|
||||
"File \u001b[0;32m~/langchain/oss-py/libs/core/langchain_core/utils/json.py:160\u001b[0m, in \u001b[0;36m_parse_json\u001b[0;34m(json_str, parser)\u001b[0m\n\u001b[1;32m 159\u001b[0m \u001b[38;5;66;03m# Parse the JSON string into a Python dictionary\u001b[39;00m\n\u001b[0;32m--> 160\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mparser\u001b[49m\u001b[43m(\u001b[49m\u001b[43mjson_str\u001b[49m\u001b[43m)\u001b[49m\n",
|
||||
"File \u001b[0;32m~/langchain/oss-py/libs/core/langchain_core/utils/json.py:118\u001b[0m, in \u001b[0;36mparse_partial_json\u001b[0;34m(s, strict)\u001b[0m\n\u001b[1;32m 115\u001b[0m \u001b[38;5;66;03m# If we got here, we ran out of characters to remove\u001b[39;00m\n\u001b[1;32m 116\u001b[0m \u001b[38;5;66;03m# and still couldn't parse the string as JSON, so return the parse error\u001b[39;00m\n\u001b[1;32m 117\u001b[0m \u001b[38;5;66;03m# for the original string.\u001b[39;00m\n\u001b[0;32m--> 118\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mjson\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mloads\u001b[49m\u001b[43m(\u001b[49m\u001b[43ms\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mstrict\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mstrict\u001b[49m\u001b[43m)\u001b[49m\n",
|
||||
"File \u001b[0;32m~/.pyenv/versions/3.11.4/lib/python3.11/json/__init__.py:359\u001b[0m, in \u001b[0;36mloads\u001b[0;34m(s, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)\u001b[0m\n\u001b[1;32m 358\u001b[0m kw[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mparse_constant\u001b[39m\u001b[38;5;124m'\u001b[39m] \u001b[38;5;241m=\u001b[39m parse_constant\n\u001b[0;32m--> 359\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mcls\u001b[39;49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkw\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdecode\u001b[49m\u001b[43m(\u001b[49m\u001b[43ms\u001b[49m\u001b[43m)\u001b[49m\n",
|
||||
"File \u001b[0;32m~/.pyenv/versions/3.11.4/lib/python3.11/json/decoder.py:337\u001b[0m, in \u001b[0;36mJSONDecoder.decode\u001b[0;34m(self, s, _w)\u001b[0m\n\u001b[1;32m 333\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m\"\"\"Return the Python representation of ``s`` (a ``str`` instance\u001b[39;00m\n\u001b[1;32m 334\u001b[0m \u001b[38;5;124;03mcontaining a JSON document).\u001b[39;00m\n\u001b[1;32m 335\u001b[0m \n\u001b[1;32m 336\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m--> 337\u001b[0m obj, end \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mraw_decode\u001b[49m\u001b[43m(\u001b[49m\u001b[43ms\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43midx\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43m_w\u001b[49m\u001b[43m(\u001b[49m\u001b[43ms\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m0\u001b[39;49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mend\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 338\u001b[0m end \u001b[38;5;241m=\u001b[39m _w(s, end)\u001b[38;5;241m.\u001b[39mend()\n",
|
||||
"File \u001b[0;32m~/.pyenv/versions/3.11.4/lib/python3.11/json/decoder.py:353\u001b[0m, in \u001b[0;36mJSONDecoder.raw_decode\u001b[0;34m(self, s, idx)\u001b[0m\n\u001b[1;32m 352\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m--> 353\u001b[0m obj, end \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mscan_once\u001b[49m\u001b[43m(\u001b[49m\u001b[43ms\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43midx\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 354\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mStopIteration\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m err:\n",
|
||||
"\u001b[0;31mJSONDecodeError\u001b[0m: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)",
|
||||
"\nThe above exception was the direct cause of the following exception:\n",
|
||||
"\u001b[0;31mOutputParserException\u001b[0m Traceback (most recent call last)",
|
||||
"Cell \u001b[0;32mIn[9], line 3\u001b[0m\n\u001b[1;32m 1\u001b[0m message \u001b[38;5;241m=\u001b[39m AIMessage(content\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m```\u001b[39m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[38;5;124m{{\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mfoo\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m:\u001b[39m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[38;5;124m```\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[1;32m 2\u001b[0m output_parser \u001b[38;5;241m=\u001b[39m JsonOutputParser()\n\u001b[0;32m----> 3\u001b[0m \u001b[43moutput_parser\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43minvoke\u001b[49m\u001b[43m(\u001b[49m\u001b[43mmessage\u001b[49m\u001b[43m)\u001b[49m\n",
|
||||
"File \u001b[0;32m~/langchain/oss-py/libs/core/langchain_core/output_parsers/base.py:193\u001b[0m, in \u001b[0;36mBaseOutputParser.invoke\u001b[0;34m(self, input, config, **kwargs)\u001b[0m\n\u001b[1;32m 186\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21minvoke\u001b[39m(\n\u001b[1;32m 187\u001b[0m \u001b[38;5;28mself\u001b[39m,\n\u001b[1;32m 188\u001b[0m \u001b[38;5;28minput\u001b[39m: Union[\u001b[38;5;28mstr\u001b[39m, BaseMessage],\n\u001b[1;32m 189\u001b[0m config: Optional[RunnableConfig] \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m,\n\u001b[1;32m 190\u001b[0m \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs: Any,\n\u001b[1;32m 191\u001b[0m ) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m T:\n\u001b[1;32m 192\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(\u001b[38;5;28minput\u001b[39m, BaseMessage):\n\u001b[0;32m--> 193\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_call_with_config\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 194\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;28;43;01mlambda\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[43minner_input\u001b[49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mparse_result\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 195\u001b[0m \u001b[43m \u001b[49m\u001b[43m[\u001b[49m\u001b[43mChatGeneration\u001b[49m\u001b[43m(\u001b[49m\u001b[43mmessage\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43minner_input\u001b[49m\u001b[43m)\u001b[49m\u001b[43m]\u001b[49m\n\u001b[1;32m 196\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 197\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;28;43minput\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 198\u001b[0m \u001b[43m \u001b[49m\u001b[43mconfig\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 199\u001b[0m \u001b[43m \u001b[49m\u001b[43mrun_type\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mparser\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[1;32m 200\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 201\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 202\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_call_with_config(\n\u001b[1;32m 203\u001b[0m \u001b[38;5;28;01mlambda\u001b[39;00m inner_input: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mparse_result([Generation(text\u001b[38;5;241m=\u001b[39minner_input)]),\n\u001b[1;32m 204\u001b[0m \u001b[38;5;28minput\u001b[39m,\n\u001b[1;32m 205\u001b[0m config,\n\u001b[1;32m 206\u001b[0m run_type\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mparser\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m 207\u001b[0m )\n",
|
||||
"File \u001b[0;32m~/langchain/oss-py/libs/core/langchain_core/runnables/base.py:1927\u001b[0m, in \u001b[0;36mRunnable._call_with_config\u001b[0;34m(self, func, input, config, run_type, serialized, **kwargs)\u001b[0m\n\u001b[1;32m 1923\u001b[0m context \u001b[38;5;241m=\u001b[39m copy_context()\n\u001b[1;32m 1924\u001b[0m context\u001b[38;5;241m.\u001b[39mrun(_set_config_context, child_config)\n\u001b[1;32m 1925\u001b[0m output \u001b[38;5;241m=\u001b[39m cast(\n\u001b[1;32m 1926\u001b[0m Output,\n\u001b[0;32m-> 1927\u001b[0m \u001b[43mcontext\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mrun\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 1928\u001b[0m \u001b[43m \u001b[49m\u001b[43mcall_func_with_variable_args\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;66;43;03m# type: ignore[arg-type]\u001b[39;49;00m\n\u001b[1;32m 1929\u001b[0m \u001b[43m \u001b[49m\u001b[43mfunc\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;66;43;03m# type: ignore[arg-type]\u001b[39;49;00m\n\u001b[1;32m 1930\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;28;43minput\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;66;43;03m# type: ignore[arg-type]\u001b[39;49;00m\n\u001b[1;32m 1931\u001b[0m \u001b[43m \u001b[49m\u001b[43mconfig\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1932\u001b[0m \u001b[43m \u001b[49m\u001b[43mrun_manager\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1933\u001b[0m \u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1934\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m,\n\u001b[1;32m 1935\u001b[0m )\n\u001b[1;32m 1936\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mBaseException\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m e:\n\u001b[1;32m 1937\u001b[0m run_manager\u001b[38;5;241m.\u001b[39mon_chain_error(e)\n",
|
||||
"File \u001b[0;32m~/langchain/oss-py/libs/core/langchain_core/runnables/config.py:396\u001b[0m, in \u001b[0;36mcall_func_with_variable_args\u001b[0;34m(func, input, config, run_manager, **kwargs)\u001b[0m\n\u001b[1;32m 394\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m run_manager \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m \u001b[38;5;129;01mand\u001b[39;00m accepts_run_manager(func):\n\u001b[1;32m 395\u001b[0m kwargs[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mrun_manager\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m=\u001b[39m run_manager\n\u001b[0;32m--> 396\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mfunc\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43minput\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n",
|
||||
"File \u001b[0;32m~/langchain/oss-py/libs/core/langchain_core/output_parsers/base.py:194\u001b[0m, in \u001b[0;36mBaseOutputParser.invoke.<locals>.<lambda>\u001b[0;34m(inner_input)\u001b[0m\n\u001b[1;32m 186\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21minvoke\u001b[39m(\n\u001b[1;32m 187\u001b[0m \u001b[38;5;28mself\u001b[39m,\n\u001b[1;32m 188\u001b[0m \u001b[38;5;28minput\u001b[39m: Union[\u001b[38;5;28mstr\u001b[39m, BaseMessage],\n\u001b[1;32m 189\u001b[0m config: Optional[RunnableConfig] \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m,\n\u001b[1;32m 190\u001b[0m \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs: Any,\n\u001b[1;32m 191\u001b[0m ) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m T:\n\u001b[1;32m 192\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(\u001b[38;5;28minput\u001b[39m, BaseMessage):\n\u001b[1;32m 193\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_call_with_config(\n\u001b[0;32m--> 194\u001b[0m \u001b[38;5;28;01mlambda\u001b[39;00m inner_input: \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mparse_result\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 195\u001b[0m \u001b[43m \u001b[49m\u001b[43m[\u001b[49m\u001b[43mChatGeneration\u001b[49m\u001b[43m(\u001b[49m\u001b[43mmessage\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43minner_input\u001b[49m\u001b[43m)\u001b[49m\u001b[43m]\u001b[49m\n\u001b[1;32m 196\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m,\n\u001b[1;32m 197\u001b[0m \u001b[38;5;28minput\u001b[39m,\n\u001b[1;32m 198\u001b[0m config,\n\u001b[1;32m 199\u001b[0m run_type\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mparser\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m 200\u001b[0m )\n\u001b[1;32m 201\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 202\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_call_with_config(\n\u001b[1;32m 203\u001b[0m \u001b[38;5;28;01mlambda\u001b[39;00m inner_input: \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mparse_result([Generation(text\u001b[38;5;241m=\u001b[39minner_input)]),\n\u001b[1;32m 204\u001b[0m \u001b[38;5;28minput\u001b[39m,\n\u001b[1;32m 205\u001b[0m config,\n\u001b[1;32m 206\u001b[0m run_type\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mparser\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m 207\u001b[0m )\n",
|
||||
"File \u001b[0;32m~/langchain/oss-py/libs/core/langchain_core/output_parsers/json.py:86\u001b[0m, in \u001b[0;36mJsonOutputParser.parse_result\u001b[0;34m(self, result, partial)\u001b[0m\n\u001b[1;32m 84\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m JSONDecodeError \u001b[38;5;28;01mas\u001b[39;00m e:\n\u001b[1;32m 85\u001b[0m msg \u001b[38;5;241m=\u001b[39m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mInvalid json output: \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mtext\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m---> 86\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m OutputParserException(msg, llm_output\u001b[38;5;241m=\u001b[39mtext) \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01me\u001b[39;00m\n",
|
||||
"\u001b[0;31mOutputParserException\u001b[0m: Invalid json output: ```\n{{\"foo\":\n```"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"message = AIMessage(content='```\\n{{\"foo\":\\n```')\n",
|
||||
"output_parser = JsonOutputParser()\n",
|
||||
"output_parser.invoke(message)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Note that some prebuilt constructs like [legacy LangChain agents](/docs/how_to/agent_executor) and chains may use output parsers internally,\n",
|
||||
"so you may see this error even if you're not visibly instantiating and using an output parser.\n",
|
||||
"\n",
|
||||
"## Troubleshooting\n",
|
||||
"\n",
|
||||
"The following may help resolve this error:\n",
|
||||
"\n",
|
||||
"- Consider using [tool calling or other structured output techniques](/docs/how_to/structured_output/) if possible without an output parser to reliably output parseable values.\n",
|
||||
" - If you are using a prebuilt chain or agent, use [LangGraph](https://langchain-ai.github.io/langgraph/) to compose your logic explicitly instead.\n",
|
||||
"- Add more precise formatting instructions to your prompt. In the above example, adding `\"You must always return valid JSON fenced by a markdown code block. Do not return any additional text.\"` to your input may help steer the model to returning the expected format.\n",
|
||||
"- If you are using a smaller or less capable model, try using a more capable one.\n",
|
||||
"- Add [LLM-powered retries](/docs/how_to/output_parser_fixing/)."
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": ".venv",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.11.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
12
docs/docs/troubleshooting/errors/index.mdx
Normal file
12
docs/docs/troubleshooting/errors/index.mdx
Normal file
@ -0,0 +1,12 @@
|
||||
# Error reference
|
||||
|
||||
This page contains guides around resolving common errors you may find while building with LangChain.
|
||||
Errors referenced below will have an `lc_error_code` property corresponding to one of the below codes when they are thrown in code.
|
||||
|
||||
- [INVALID_PROMPT_INPUT](/docs/troubleshooting/errors/INVALID_PROMPT_INPUT)
|
||||
- [INVALID_TOOL_RESULTS](/docs/troubleshooting/errors/INVALID_TOOL_RESULTS)
|
||||
- [MESSAGE_COERCION_FAILURE](/docs/troubleshooting/errors/MESSAGE_COERCION_FAILURE)
|
||||
- [MODEL_AUTHENTICATION](/docs/troubleshooting/errors/MODEL_AUTHENTICATION)
|
||||
- [MODEL_NOT_FOUND](/docs/troubleshooting/errors/MODEL_NOT_FOUND)
|
||||
- [MODEL_RATE_LIMIT](/docs/troubleshooting/errors/MODEL_RATE_LIMIT)
|
||||
- [OUTPUT_PARSING_FAILURE](/docs/troubleshooting/errors/OUTPUT_PARSING_FAILURE)
|
@ -438,7 +438,7 @@
|
||||
"app = workflow.compile(checkpointer=MemorySaver())\n",
|
||||
"\n",
|
||||
"# Async invocation:\n",
|
||||
"output = await app.ainvoke({\"messages\": input_messages}, config):\n",
|
||||
"output = await app.ainvoke({\"messages\": input_messages}, config)\n",
|
||||
"output[\"messages\"][-1].pretty_print()\n",
|
||||
"```\n",
|
||||
"\n",
|
||||
@ -449,7 +449,7 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Right now, all we've done is add a simple persistence layer around the model. We can start to make the more complicated and personalized by adding in a prompt template.\n",
|
||||
"Right now, all we've done is add a simple persistence layer around the model. We can start to make the chatbot more complicated and personalized by adding in a prompt template.\n",
|
||||
"\n",
|
||||
"## Prompt templates\n",
|
||||
"\n",
|
||||
@ -686,7 +686,7 @@
|
||||
"\n",
|
||||
"input_messages = [HumanMessage(query)]\n",
|
||||
"output = app.invoke(\n",
|
||||
" {\"messages\": input_messages, \"language\": language},\n",
|
||||
" {\"messages\": input_messages},\n",
|
||||
" config,\n",
|
||||
")\n",
|
||||
"output[\"messages\"][-1].pretty_print()"
|
||||
|
@ -497,15 +497,14 @@
|
||||
"# 4. Create chain\n",
|
||||
"chain = prompt_template | model | parser\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"# 4. App definition\n",
|
||||
"# 5. App definition\n",
|
||||
"app = FastAPI(\n",
|
||||
" title=\"LangChain Server\",\n",
|
||||
" version=\"1.0\",\n",
|
||||
" description=\"A simple API server using LangChain's Runnable interfaces\",\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"# 5. Adding chain route\n",
|
||||
"# 6. Adding chain route\n",
|
||||
"add_routes(\n",
|
||||
" app,\n",
|
||||
" chain,\n",
|
||||
|
@ -87,7 +87,7 @@
|
||||
"* Run `.read Chinook.sql`\n",
|
||||
"* Test `SELECT * FROM Artist LIMIT 10;`\n",
|
||||
"\n",
|
||||
"Now, `Chinhook.db` is in our directory and we can interface with it using the SQLAlchemy-driven `SQLDatabase` class:"
|
||||
"Now, `Chinook.db` is in our directory and we can interface with it using the SQLAlchemy-driven `SQLDatabase` class:"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -377,7 +377,7 @@
|
||||
"\n",
|
||||
"* [Prompting strategies](/docs/how_to/sql_prompting): Advanced prompt engineering techniques.\n",
|
||||
"* [Query checking](/docs/how_to/sql_query_checking): Add query validation and error handling.\n",
|
||||
"* [Large databses](/docs/how_to/sql_large_db): Techniques for working with large databases."
|
||||
"* [Large databases](/docs/how_to/sql_large_db): Techniques for working with large databases."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -17,7 +17,7 @@ The following features have been added during the development of 0.1.x:
|
||||
- Include response metadata in `AIMessage` to make it easy to access raw output from the underlying models
|
||||
- Tooling to visualize [your runnables](https://python.langchain.com/docs/expression_language/how_to/inspect/) or [your langgraph app](https://github.com/langchain-ai/langgraph/blob/main/examples/visualization.ipynb)
|
||||
- Interoperability of chat message histories across most providers
|
||||
- [Over 20+ partner packages in python](https://python.langchain.com/docs/integrations/platforms/) for popular integrations
|
||||
- [Over 20+ partner packages in python](https://python.langchain.com/docs/integrations/providers/) for popular integrations
|
||||
|
||||
|
||||
## What’s coming to LangChain?
|
||||
|
@ -181,6 +181,11 @@ const config = {
|
||||
docId: "people",
|
||||
label: "People",
|
||||
},
|
||||
{
|
||||
type: "doc",
|
||||
docId: "troubleshooting/errors/index",
|
||||
label: "Error reference",
|
||||
},
|
||||
{
|
||||
type: 'html',
|
||||
value: '<hr class="dropdown-separator" style="margin-top: 0.5rem; margin-bottom: 0.5rem">',
|
||||
|
@ -26,13 +26,14 @@
|
||||
"@docusaurus/preset-classic": "3.5.2",
|
||||
"@docusaurus/remark-plugin-npm2yarn": "^3.5.2",
|
||||
"@docusaurus/theme-mermaid": "3.5.2",
|
||||
"prism-react-renderer": "^2.1.0",
|
||||
"@giscus/react": "^3.0.0",
|
||||
"@mdx-js/react": "^3",
|
||||
"@supabase/supabase-js": "^2.39.7",
|
||||
"clsx": "^1.2.1",
|
||||
"cookie": "^0.6.0",
|
||||
"isomorphic-dompurify": "^2.7.0",
|
||||
"json-loader": "^0.5.7",
|
||||
"prism-react-renderer": "^2.1.0",
|
||||
"process": "^0.11.10",
|
||||
"react": "^18",
|
||||
"react-dom": "^18",
|
||||
|
@ -8,7 +8,7 @@ DOCS_DIR = Path(__file__).parents[1]
|
||||
PLATFORMS = {
|
||||
path.split("/")[-1][:-4]
|
||||
for path in glob.glob(
|
||||
str(DOCS_DIR) + "/docs/integrations/platforms/*.mdx", recursive=True
|
||||
str(DOCS_DIR) + "/docs/integrations/providers/*.mdx", recursive=True
|
||||
)
|
||||
}
|
||||
EXTERNAL_PACKAGES = {
|
||||
@ -71,15 +71,15 @@ CUSTOM_NAME = {
|
||||
"airbyte": "Airbyte",
|
||||
}
|
||||
CUSTOM_PROVIDER_PAGES = {
|
||||
"azure-dynamic-sessions": "/docs/integrations/platforms/microsoft/",
|
||||
"google-community": "/docs/integrations/platforms/google/",
|
||||
"google-genai": "/docs/integrations/platforms/google/",
|
||||
"google-vertexai": "/docs/integrations/platforms/google/",
|
||||
"azure-dynamic-sessions": "/docs/integrations/providers/microsoft/",
|
||||
"google-community": "/docs/integrations/providers/google/",
|
||||
"google-genai": "/docs/integrations/providers/google/",
|
||||
"google-vertexai": "/docs/integrations/providers/google/",
|
||||
"nvidia-ai-endpoints": "/docs/integrations/providers/nvidia/",
|
||||
"exa": "/docs/integrations/providers/exa_search/",
|
||||
"mongodb": "/docs/integrations/providers/mongodb_atlas/",
|
||||
}
|
||||
PLATFORM_PAGES = {name: f"/docs/integrations/platforms/{name}/" for name in PLATFORMS}
|
||||
PLATFORM_PAGES = {name: f"/docs/integrations/providers/{name}/" for name in PLATFORMS}
|
||||
PROVIDER_PAGES = {
|
||||
name: f"/docs/integrations/providers/{name}/"
|
||||
for name in ALL_PACKAGES
|
||||
@ -104,7 +104,7 @@ def package_row(name: str) -> str:
|
||||
|
||||
|
||||
def table() -> str:
|
||||
header = """| Provider | Package | Downloads | Latest | [JS](https://js.langchain.com/docs/integrations/platforms/) |
|
||||
header = """| Provider | Package | Downloads | Latest | [JS](https://js.langchain.com/docs/integrations/providers/) |
|
||||
| :--- | :---: | :---: | :---: | :---: |
|
||||
"""
|
||||
return header + "\n".join(package_row(name) for name in sorted(ALL_PACKAGES))
|
||||
@ -136,12 +136,12 @@ These providers have standalone `langchain-{{provider}}` packages for improved v
|
||||
|
||||
## All Providers
|
||||
|
||||
Click [here](/docs/integrations/providers/) to see all providers.
|
||||
Click [here](/docs/integrations/providers/all) to see all providers.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
output_dir = Path(sys.argv[1]) / "integrations" / "platforms"
|
||||
output_dir = Path(sys.argv[1]) / "integrations" / "providers"
|
||||
with open(output_dir / "index.mdx", "w") as f:
|
||||
f.write(doc())
|
||||
|
@ -122,7 +122,10 @@ def add_vcr_to_notebook(
|
||||
return notebook
|
||||
|
||||
|
||||
def process_notebooks(should_comment_install_cells: bool) -> None:
|
||||
def process_notebooks(
|
||||
should_comment_install_cells: bool,
|
||||
working_directory: str,
|
||||
) -> None:
|
||||
for directory in NOTEBOOK_DIRS:
|
||||
for root, _, files in os.walk(directory):
|
||||
for file in files:
|
||||
@ -130,6 +133,12 @@ def process_notebooks(should_comment_install_cells: bool) -> None:
|
||||
continue
|
||||
|
||||
notebook_path = os.path.join(root, file)
|
||||
# Filter notebooks based on the working_directory input
|
||||
if working_directory != "all" and not notebook_path.startswith(
|
||||
working_directory
|
||||
):
|
||||
continue
|
||||
|
||||
try:
|
||||
notebook = nbformat.read(notebook_path, as_version=4)
|
||||
|
||||
@ -172,8 +181,16 @@ def process_notebooks(should_comment_install_cells: bool) -> None:
|
||||
default=False,
|
||||
help="Whether to comment out install cells",
|
||||
)
|
||||
def main(comment_install_cells):
|
||||
process_notebooks(should_comment_install_cells=comment_install_cells)
|
||||
@click.option(
|
||||
"--working-directory",
|
||||
default="all",
|
||||
help="Working directory or specific notebook to process",
|
||||
)
|
||||
def main(comment_install_cells, working_directory):
|
||||
process_notebooks(
|
||||
should_comment_install_cells=comment_install_cells,
|
||||
working_directory=working_directory,
|
||||
)
|
||||
logger.info("All notebooks processed successfully.")
|
||||
|
||||
|
||||
|
33
docs/scripts/update_cassettes.sh
Executable file
33
docs/scripts/update_cassettes.sh
Executable file
@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Get the working directory from the input argument, default to 'all' if not provided
|
||||
WORKING_DIRECTORY=${1:-all}
|
||||
|
||||
# Function to delete cassettes
|
||||
delete_cassettes() {
|
||||
local dir=$1
|
||||
if [ "$dir" == "all" ]; then
|
||||
echo "Deleting all cassettes..."
|
||||
rm -f docs/cassettes/*.msgpack.zlib
|
||||
else
|
||||
# Extract the filename from the directory path
|
||||
local filename=$(basename "$dir" .ipynb)
|
||||
echo "Deleting cassettes for $filename..."
|
||||
rm -f docs/cassettes/${filename}_*.msgpack.zlib
|
||||
fi
|
||||
}
|
||||
|
||||
# Delete existing cassettes
|
||||
delete_cassettes "$WORKING_DIRECTORY"
|
||||
|
||||
# Pre-download tiktoken files
|
||||
echo "Pre-downloading tiktoken files..."
|
||||
poetry run python docs/scripts/download_tiktoken.py
|
||||
|
||||
# Prepare notebooks
|
||||
echo "Preparing notebooks for CI..."
|
||||
poetry run python docs/scripts/prepare_notebooks_for_ci.py --comment-install-cells --working-directory "$WORKING_DIRECTORY"
|
||||
|
||||
# Run notebooks
|
||||
echo "Running notebooks..."
|
||||
./docs/scripts/execute_notebooks.sh "$WORKING_DIRECTORY"
|
@ -136,28 +136,49 @@ module.exports = {
|
||||
collapsible: false,
|
||||
items: [
|
||||
{
|
||||
type: "autogenerated",
|
||||
dirName: "integrations/platforms",
|
||||
type: "doc",
|
||||
id: "integrations/providers/anthropic",
|
||||
},
|
||||
{
|
||||
type: "doc",
|
||||
id: "integrations/providers/aws",
|
||||
},
|
||||
{
|
||||
type: "doc",
|
||||
id: "integrations/providers/google",
|
||||
},
|
||||
{
|
||||
type: "doc",
|
||||
id: "integrations/providers/huggingface",
|
||||
},
|
||||
{
|
||||
type: "doc",
|
||||
id: "integrations/providers/microsoft",
|
||||
},
|
||||
{
|
||||
type: "doc",
|
||||
id: "integrations/providers/openai",
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
label: "More",
|
||||
collapsed: true,
|
||||
collapsible: false,
|
||||
items: [
|
||||
{
|
||||
type: "autogenerated",
|
||||
dirName: "integrations/providers",
|
||||
className: "hidden",
|
||||
},
|
||||
],
|
||||
link: {
|
||||
type: "generated-index",
|
||||
slug: "integrations/providers",
|
||||
slug: "integrations/providers/all",
|
||||
},
|
||||
},
|
||||
],
|
||||
link: {
|
||||
type: "doc",
|
||||
id: "integrations/platforms/index",
|
||||
id: "integrations/providers/index",
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -1,11 +1,25 @@
|
||||
import React from 'react';
|
||||
import Paginator from '@theme-original/DocItem/Paginator';
|
||||
import Feedback from "@theme/Feedback";
|
||||
import Giscus from "@giscus/react";
|
||||
|
||||
export default function PaginatorWrapper(props) {
|
||||
return (
|
||||
<>
|
||||
<Feedback />
|
||||
<Giscus
|
||||
repo="langchain-ai/langchain"
|
||||
repoId="R_kgDOIPDwlg"
|
||||
category="Docs Discussions"
|
||||
categoryId="DIC_kwDOIPDwls4CjJYb"
|
||||
mapping="pathname"
|
||||
strict="1"
|
||||
reactionsEnabled="0"
|
||||
emitMetadata="0"
|
||||
inputPosition="bottom"
|
||||
theme="preferred_color_scheme"
|
||||
lang="en"
|
||||
loading="lazy" />
|
||||
<Paginator {...props} />
|
||||
</>
|
||||
);
|
||||
|
@ -1026,8 +1026,8 @@ const FEATURE_TABLES = {
|
||||
link: "mongodb_atlas",
|
||||
deleteById: true,
|
||||
filtering: true,
|
||||
searchByVector: false,
|
||||
searchWithScore: false,
|
||||
searchByVector: true,
|
||||
searchWithScore: true,
|
||||
async: true,
|
||||
passesStandardTests: false,
|
||||
multiTenancy: false,
|
||||
|
@ -220,10 +220,6 @@ export default function Feedback() {
|
||||
onMouseUp: (e) => (e.currentTarget.style.backgroundColor = "#f0f0f0"),
|
||||
};
|
||||
|
||||
const newGithubIssueURL = pathname
|
||||
? `https://github.com/langchain-ai/langchain/issues/new?assignees=&labels=03+-+Documentation&projects=&template=documentation.yml&title=DOC%3A+%3CIssue+related+to+${pathname}%3E&url=https://python.langchain.com${pathname}`
|
||||
: "https://github.com/langchain-ai/langchain/issues/new?assignees=&labels=03+-+Documentation&projects=&template=documentation.yml&title=DOC%3A+%3CPlease+write+a+comprehensive+title+after+the+%27DOC%3A+%27+prefix%3E";
|
||||
|
||||
return (
|
||||
<div style={{ display: "flex", flexDirection: "column" }}>
|
||||
<hr />
|
||||
@ -296,14 +292,6 @@ export default function Feedback() {
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
<br />
|
||||
<h4>
|
||||
You can also leave detailed feedback{" "}
|
||||
<a target="_blank" href={newGithubIssueURL}>
|
||||
on GitHub
|
||||
</a>
|
||||
.
|
||||
</h4>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -2769,8 +2769,8 @@ const suggestedLinks = {
|
||||
"/docs/integrations/chat/hunyuan/": {"canonical": "/docs/integrations/chat/tencent_hunyuan/"},
|
||||
"/docs/integrations/document_loaders/excel/": {"canonical": "/docs/integrations/document_loaders/microsoft_excel/"},
|
||||
"/docs/integrations/document_loaders/onenote/": {"canonical": "/docs/integrations/document_loaders/microsoft_onenote/"},
|
||||
"/docs/integrations/providers/aws_dynamodb/": {"canonical": "/docs/integrations/platforms/aws/"},
|
||||
"/docs/integrations/providers/scann/": {"canonical": "/docs/integrations/platforms/google/"},
|
||||
"/docs/integrations/providers/aws_dynamodb/": {"canonical": "/docs/integrations/providers/aws/"},
|
||||
"/docs/integrations/providers/scann/": {"canonical": "/docs/integrations/providers/google/"},
|
||||
"/docs/integrations/toolkits/google_drive/": {"canonical": "/docs/integrations/tools/google_drive/"},
|
||||
"/docs/use_cases/question_answering/chat_vector_db/": {"canonical": "/docs/tutorials/rag/", "alternative": ["/v0.1/docs/use_cases/question_answering/"]},
|
||||
"/docs/use_cases/question_answering/in_memory_question_answering/": {"canonical": "/docs/tutorials/rag/", "alternative": ["/v0.1/docs/use_cases/question_answering/"]},
|
||||
@ -2791,24 +2791,24 @@ const suggestedLinks = {
|
||||
"/docs/integrations/": {"canonical": "/docs/integrations/providers/"},
|
||||
"/docs/expression_language/cookbook/routing/": {"canonical": "/docs/how_to/routing/", "alternative": ["/v0.1/docs/expression_language/how_to/routing/"]},
|
||||
"/docs/guides/expression_language/": {"canonical": "/docs/how_to/#langchain-expression-language-lcel", "alternative": ["/v0.1/docs/expression_language/"]},
|
||||
"/docs/integrations/providers/amazon_api_gateway/": {"canonical": "/docs/integrations/platforms/aws/"},
|
||||
"/docs/integrations/providers/huggingface/": {"canonical": "/docs/integrations/platforms/huggingface/"},
|
||||
"/docs/integrations/providers/azure_blob_storage/": {"canonical": "/docs/integrations/platforms/microsoft/"},
|
||||
"/docs/integrations/providers/google_vertexai_matchingengine/": {"canonical": "/docs/integrations/platforms/google/"},
|
||||
"/docs/integrations/providers/aws_s3/": {"canonical": "/docs/integrations/platforms/aws/"},
|
||||
"/docs/integrations/providers/azure_openai/": {"canonical": "/docs/integrations/platforms/microsoft/"},
|
||||
"/docs/integrations/providers/azure_cognitive_search_/": {"canonical": "/docs/integrations/platforms/microsoft/"},
|
||||
"/docs/integrations/providers/bedrock/": {"canonical": "/docs/integrations/platforms/aws/"},
|
||||
"/docs/integrations/providers/google_bigquery/": {"canonical": "/docs/integrations/platforms/google/"},
|
||||
"/docs/integrations/providers/google_cloud_storage/": {"canonical": "/docs/integrations/platforms/google/"},
|
||||
"/docs/integrations/providers/google_drive/": {"canonical": "/docs/integrations/platforms/google/"},
|
||||
"/docs/integrations/providers/google_search/": {"canonical": "/docs/integrations/platforms/google/"},
|
||||
"/docs/integrations/providers/microsoft_onedrive/": {"canonical": "/docs/integrations/platforms/microsoft/"},
|
||||
"/docs/integrations/providers/microsoft_powerpoint/": {"canonical": "/docs/integrations/platforms/microsoft/"},
|
||||
"/docs/integrations/providers/microsoft_word/": {"canonical": "/docs/integrations/platforms/microsoft/"},
|
||||
"/docs/integrations/providers/sagemaker_endpoint/": {"canonical": "/docs/integrations/platforms/aws/"},
|
||||
"/docs/integrations/providers/amazon_api_gateway/": {"canonical": "/docs/integrations/providers/aws/"},
|
||||
"/docs/integrations/providers/huggingface/": {"canonical": "/docs/integrations/providers/huggingface/"},
|
||||
"/docs/integrations/providers/azure_blob_storage/": {"canonical": "/docs/integrations/providers/microsoft/"},
|
||||
"/docs/integrations/providers/google_vertexai_matchingengine/": {"canonical": "/docs/integrations/providers/google/"},
|
||||
"/docs/integrations/providers/aws_s3/": {"canonical": "/docs/integrations/providers/aws/"},
|
||||
"/docs/integrations/providers/azure_openai/": {"canonical": "/docs/integrations/providers/microsoft/"},
|
||||
"/docs/integrations/providers/azure_cognitive_search_/": {"canonical": "/docs/integrations/providers/microsoft/"},
|
||||
"/docs/integrations/providers/bedrock/": {"canonical": "/docs/integrations/providers/aws/"},
|
||||
"/docs/integrations/providers/google_bigquery/": {"canonical": "/docs/integrations/providers/google/"},
|
||||
"/docs/integrations/providers/google_cloud_storage/": {"canonical": "/docs/integrations/providers/google/"},
|
||||
"/docs/integrations/providers/google_drive/": {"canonical": "/docs/integrations/providers/google/"},
|
||||
"/docs/integrations/providers/google_search/": {"canonical": "/docs/integrations/providers/google/"},
|
||||
"/docs/integrations/providers/microsoft_onedrive/": {"canonical": "/docs/integrations/providers/microsoft/"},
|
||||
"/docs/integrations/providers/microsoft_powerpoint/": {"canonical": "/docs/integrations/providers/microsoft/"},
|
||||
"/docs/integrations/providers/microsoft_word/": {"canonical": "/docs/integrations/providers/microsoft/"},
|
||||
"/docs/integrations/providers/sagemaker_endpoint/": {"canonical": "/docs/integrations/providers/aws/"},
|
||||
"/docs/integrations/providers/sagemaker_tracking/": {"canonical": "/docs/integrations/callbacks/sagemaker_tracking/"},
|
||||
"/docs/integrations/providers/openai/": {"canonical": "/docs/integrations/platforms/openai/"},
|
||||
"/docs/integrations/providers/openai/": {"canonical": "/docs/integrations/providers/openai/"},
|
||||
"/docs/integrations/cassandra/": {"canonical": "/docs/integrations/providers/cassandra/"},
|
||||
"/docs/integrations/providers/providers/semadb/": {"canonical": "/docs/integrations/providers/semadb/"},
|
||||
"/docs/integrations/vectorstores/vectorstores/semadb/": {"canonical": "/docs/integrations/vectorstores/semadb/"},
|
||||
@ -2819,7 +2819,7 @@ const suggestedLinks = {
|
||||
"/docs/integrations/document_loaders/Etherscan/": {"canonical": "/docs/integrations/document_loaders/etherscan/"},
|
||||
"/docs/integrations/document_loaders/merge_doc_loader/": {"canonical": "/docs/integrations/document_loaders/merge_doc/"},
|
||||
"/docs/integrations/document_loaders/recursive_url_loader/": {"canonical": "/docs/integrations/document_loaders/recursive_url/"},
|
||||
"/docs/integrations/providers/google_document_ai/": {"canonical": "/docs/integrations/platforms/google/"},
|
||||
"/docs/integrations/providers/google_document_ai/": {"canonical": "/docs/integrations/providers/google/"},
|
||||
"/docs/integrations/memory/motorhead_memory_managed/": {"canonical": "/docs/integrations/memory/motorhead_memory/"},
|
||||
"/docs/integrations/memory/dynamodb_chat_message_history/": {"canonical": "/docs/integrations/memory/aws_dynamodb/"},
|
||||
"/docs/integrations/memory/entity_memory_with_sqlite/": {"canonical": "/docs/integrations/memory/sqlite/"},
|
||||
|
@ -81,6 +81,14 @@
|
||||
{
|
||||
"source": "/docs/integrations/providers/mlflow_ai_gateway(/?)",
|
||||
"destination": "/docs/integrations/providers/mlflow/"
|
||||
},
|
||||
{
|
||||
"source": "/docs/integrations/platforms/:path((?:anthropic|aws|google|huggingface|microsoft|openai)?/?)*",
|
||||
"destination": "/docs/integrations/providers/:path*"
|
||||
},
|
||||
{
|
||||
"source": "/docs/troubleshooting/errors/:path((?:GRAPH_RECURSION_LIMIT|INVALID_CONCURRENT_GRAPH_UPDATE|INVALID_GRAPH_NODE_RETURN_VALUE|MULTIPLE_SUBGRAPHS)/?)*",
|
||||
"destination": "https://langchain-ai.github.io/langgraph/troubleshooting/errors/:path*"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1709,6 +1709,13 @@
|
||||
resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.1.tgz#de633db3ec2ef6a3c89e2f19038063e8a122e2c2"
|
||||
integrity sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==
|
||||
|
||||
"@giscus/react@^3.0.0":
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@giscus/react/-/react-3.0.0.tgz#fdadce2c7e4023eb4fdbcc219cdd97f6d7aa17f0"
|
||||
integrity sha512-hgCjLpg3Wgh8VbTF5p8ZLcIHI74wvDk1VIFv12+eKhenNVUDjgwNg2B1aq/3puyHOad47u/ZSyqiMtohjy/OOA==
|
||||
dependencies:
|
||||
giscus "^1.5.0"
|
||||
|
||||
"@hapi/hoek@^9.0.0", "@hapi/hoek@^9.3.0":
|
||||
version "9.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.3.0.tgz#8368869dcb735be2e7f5cb7647de78e167a251fb"
|
||||
@ -1835,6 +1842,18 @@
|
||||
resolved "https://registry.yarnpkg.com/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz#4fc56c15c580b9adb7dc3c333a134e540b44bfb1"
|
||||
integrity sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==
|
||||
|
||||
"@lit-labs/ssr-dom-shim@^1.2.0":
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.2.1.tgz#2f3a8f1d688935c704dbc89132394a41029acbb8"
|
||||
integrity sha512-wx4aBmgeGvFmOKucFKY+8VFJSYZxs9poN3SDNQFF6lT6NrQUnHiPB2PWz2sc4ieEcAaYYzN+1uWahEeTq2aRIQ==
|
||||
|
||||
"@lit/reactive-element@^2.0.4":
|
||||
version "2.0.4"
|
||||
resolved "https://registry.yarnpkg.com/@lit/reactive-element/-/reactive-element-2.0.4.tgz#8f2ed950a848016383894a26180ff06c56ae001b"
|
||||
integrity sha512-GFn91inaUa2oHLak8awSIigYz0cU0Payr1rcFsrkf5OJ5eSPxElyZfKh0f2p9FsTiZWXQdWGJeXZICEfXXYSXQ==
|
||||
dependencies:
|
||||
"@lit-labs/ssr-dom-shim" "^1.2.0"
|
||||
|
||||
"@mdx-js/mdx@^3.0.0":
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@mdx-js/mdx/-/mdx-3.0.1.tgz#617bd2629ae561fdca1bb88e3badd947f5a82191"
|
||||
@ -2569,7 +2588,7 @@
|
||||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/trusted-types@*":
|
||||
"@types/trusted-types@*", "@types/trusted-types@^2.0.2":
|
||||
version "2.0.7"
|
||||
resolved "https://registry.yarnpkg.com/@types/trusted-types/-/trusted-types-2.0.7.tgz#baccb07a970b91707df3a3e8ba6896c57ead2d11"
|
||||
integrity sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==
|
||||
@ -5549,6 +5568,13 @@ get-symbol-description@^1.0.2:
|
||||
es-errors "^1.3.0"
|
||||
get-intrinsic "^1.2.4"
|
||||
|
||||
giscus@^1.5.0:
|
||||
version "1.5.0"
|
||||
resolved "https://registry.yarnpkg.com/giscus/-/giscus-1.5.0.tgz#8299fa056b2ed31ec8b05d4645871e016982b4b2"
|
||||
integrity sha512-t3LL0qbSO3JXq3uyQeKpF5CegstGfKX/0gI6eDe1cmnI7D56R7j52yLdzw4pdKrg3VnufwCgCM3FDz7G1Qr6lg==
|
||||
dependencies:
|
||||
lit "^3.1.2"
|
||||
|
||||
github-slugger@^1.5.0:
|
||||
version "1.5.0"
|
||||
resolved "https://registry.yarnpkg.com/github-slugger/-/github-slugger-1.5.0.tgz#17891bbc73232051474d68bd867a34625c955f7d"
|
||||
@ -6882,6 +6908,31 @@ lines-and-columns@^1.1.6:
|
||||
resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632"
|
||||
integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==
|
||||
|
||||
lit-element@^4.1.0:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/lit-element/-/lit-element-4.1.1.tgz#07905992815076e388cf6f1faffc7d6866c82007"
|
||||
integrity sha512-HO9Tkkh34QkTeUmEdNYhMT8hzLid7YlMlATSi1q4q17HE5d9mrrEHJ/o8O2D0cMi182zK1F3v7x0PWFjrhXFew==
|
||||
dependencies:
|
||||
"@lit-labs/ssr-dom-shim" "^1.2.0"
|
||||
"@lit/reactive-element" "^2.0.4"
|
||||
lit-html "^3.2.0"
|
||||
|
||||
lit-html@^3.2.0:
|
||||
version "3.2.1"
|
||||
resolved "https://registry.yarnpkg.com/lit-html/-/lit-html-3.2.1.tgz#8fc49e3531ee5947e4d93e8a5aa642ab1649833b"
|
||||
integrity sha512-qI/3lziaPMSKsrwlxH/xMgikhQ0EGOX2ICU73Bi/YHFvz2j/yMCIrw4+puF2IpQ4+upd3EWbvnHM9+PnJn48YA==
|
||||
dependencies:
|
||||
"@types/trusted-types" "^2.0.2"
|
||||
|
||||
lit@^3.1.2:
|
||||
version "3.2.1"
|
||||
resolved "https://registry.yarnpkg.com/lit/-/lit-3.2.1.tgz#d6dd15eac20db3a098e81e2c85f70a751ff55592"
|
||||
integrity sha512-1BBa1E/z0O9ye5fZprPtdqnc0BFzxIxTTOO/tQFmyC/hj1O3jL4TfmLBw0WEwjAokdLwpclkvGgDJwTIh0/22w==
|
||||
dependencies:
|
||||
"@lit/reactive-element" "^2.0.4"
|
||||
lit-element "^4.1.0"
|
||||
lit-html "^3.2.0"
|
||||
|
||||
loader-runner@^4.2.0:
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1"
|
||||
|
@ -38,6 +38,7 @@ jinja2>=3,<4
|
||||
jq>=1.4.1,<2
|
||||
jsonschema>1
|
||||
keybert>=0.8.5
|
||||
langchain_openai>=0.2.1
|
||||
litellm>=1.30,<=1.39.5
|
||||
lxml>=4.9.3,<6.0
|
||||
markdownify>=0.11.6,<0.12
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user