Skip to content

Commit

Permalink
Update notebooks.
Browse files Browse the repository at this point in the history
  • Loading branch information
qiuosier committed Sep 30, 2024
1 parent 5311bc1 commit 05fb9f5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs/docs/integrations/chat/oci_data_science.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
"\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 a chat model hosted on a [OCI Data Science Model Deployment Service](https://docs.oracle.com/en-us/iaas/data-science/using/model-dep-about.htm).\n",
"\n",
"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.\n",
Expand Down Expand Up @@ -112,6 +114,7 @@
"outputs": [],
"source": [
"import os\n",
"\n",
"from langchain_community.chat_models import ChatOCIModelDeploymentVLLM\n",
"\n",
"# Set authentication through environment variables\n",
Expand Down Expand Up @@ -302,13 +305,12 @@
}
],
"source": [
"import sys\n",
"import os\n",
"import sys\n",
"\n",
"from langchain_community.chat_models import ChatOCIModelDeployment\n",
"from langchain_core.prompts import ChatPromptTemplate\n",
"\n",
"\n",
"prompt = ChatPromptTemplate.from_messages(\n",
" [(\"human\", \"List out the 5 states in the United State.\")]\n",
")\n",
Expand Down Expand Up @@ -349,8 +351,8 @@
}
],
"source": [
"from langchain_core.pydantic_v1 import BaseModel\n",
"from langchain_community.chat_models import ChatOCIModelDeployment\n",
"from pydantic import BaseModel\n",
"\n",
"\n",
"class Joke(BaseModel):\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"\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",
"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."
Expand Down

0 comments on commit 05fb9f5

Please sign in to comment.