Skip to content

Commit b1f1f42

Browse files
committed
Update docs.
1 parent 8737099 commit b1f1f42

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

docs/source/user_guide/large_language_model/index.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ Integration with LangChain
1919
**************************
2020
ADS is designed to work with LangChain, enabling developers to incorporate various LangChain components and models deployed on OCI seamlessly into their applications. Additionally, ADS can package LangChain applications and deploy it as a REST API endpoint using OCI Data Science Model Deployment.
2121

22+
* `Bridging cloud and conversational AI: LangChain and OCI Data Science platform <https://blogs.oracle.com/ai-and-datascience/post/cloud-conversational-ai-langchain-oci-data-science>`_
23+
* `Deploy LangChain applications as OCI model deployments <https://blogs.oracle.com/ai-and-datascience/post/deploy-langchain-application-as-model-deployment>`_
24+
2225

2326
.. admonition:: Installation
2427
:class: note

docs/source/user_guide/large_language_model/langchain_models.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Here is an example of using prompt template and OCI generative AI LLM to build a
4444
map_input = RunnableParallel(text=RunnablePassthrough())
4545
# Template for the input text.
4646
template = PromptTemplate.from_template(
47-
"Translate the text into French.\nText:{text}\nFrench translation: "
47+
"Translate English into French. Do not ask any questions.\nEnglish: Hello!\nFrench: "
4848
)
4949
llm = GenerativeAI(
5050
compartment_id="<compartment_ocid>",
@@ -58,8 +58,8 @@ Here is an example of using prompt template and OCI generative AI LLM to build a
5858
translation_app = map_input | template | llm
5959
6060
# Now you have a translation app.
61-
translation_app.invoke("How are you?")
62-
# "Comment ça va?"
61+
translation_app.invoke("Hello!")
62+
# "Bonjour!"
6363
6464
Similarly, you can use the embedding model:
6565

@@ -80,6 +80,11 @@ Similarly, you can use the embedding model:
8080
Integration with Model Deployment
8181
=================================
8282

83+
.. admonition:: Available in LangChain
84+
:class: note
85+
86+
The same ``OCIModelDeploymentVLLM`` and ``ModelDeploymentTGI`` classes are also `available from LangChain <https://python.langchain.com/docs/integrations/llms/oci_model_deployment_endpoint>`_.
87+
8388
If you deploy open-source or your own LLM on OCI model deployment service using `vLLM <https://docs.vllm.ai/en/latest/>`_ or `HuggingFace TGI <https://huggingface.co/docs/text-generation-inference/index>`_ , you can use the ``ModelDeploymentVLLM`` or ``ModelDeploymentTGI`` to integrate your model with LangChain.
8489

8590
.. code-block:: python3

0 commit comments

Comments
 (0)