Skip to content

Commit 2bbaef7

Browse files
committed
Updated docs and added unit tests.
1 parent edf9f0f commit 2bbaef7

File tree

3 files changed

+11
-20
lines changed

3 files changed

+11
-20
lines changed

docs/source/user_guide/langchain/deploy.rst

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
1-
################################
2-
LangChain Application Deployment
3-
################################
1+
#########
2+
LangChain
3+
#########
44

55
Oracle ADS SDK now supports the deployment of LangChain application to OCI data science model deployment and you can easily do so just by writing a couple lines of code.
66

7-
Installation
8-
************
9-
10-
Before you start, install the ``oracle-ads >= 2.9.1`` package following the command below.
11-
The Oracle ADS SDK has all of the required tools needed for the deployment.
12-
13-
.. code-block:: shell
14-
15-
pip install oracle-ads —-upgrade
7+
.. versionadded:: 2.9.1
168

179
Configuration
1810
*************
@@ -24,13 +16,6 @@ Here we're using the ``resource_principal`` as auth type and you can configure t
2416
2517
allow dynamic-group <dynamic-group-name> to manage data-science-model-deployments in compartment <compartment-name>
2618
27-
Set auth for ADS SDK to access the OCI data science model deployment resources.
28-
29-
.. code-block:: python3
30-
31-
import ads
32-
ads.set_auth(auth="resource_principal")
33-
3419
Create LangChain Application
3520
****************************
3621

@@ -153,8 +138,14 @@ Now the OCI data science model deployment endpoint is ready and you can invoke i
153138
154139
chain_deployment.predict(data={"subject": "animals"})["prediction"]
155140
141+
.. figure:: figures/prediction.png
142+
:width: 800
143+
156144
Alternatively, you can use OCI CLI to invoke the model deployment. Remember to replace the ``langchain_application_model_deployment_url`` with the actual model deployment url which you can find in the output from deploy step.
157145

158146
.. code-block:: shell
159147
160-
oci raw-request --http-method POST --target-uri <langchain_application_model_deployment_url>/predict --request-body '{"subject": "animals"}' --auth resource_principal
148+
oci raw-request --http-method POST --target-uri <langchain_application_model_deployment_url>/predict --request-body '{"subject": "animals"}' --auth resource_principal
149+
150+
.. figure:: figures/cli_prediction.png
151+
:width: 800
Loading
Loading

0 commit comments

Comments
 (0)