From the course: Oracle Cloud Infrastructure Generative AI Professional
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Demo: LangChain basics - Oracle Cloud Infrastructure Tutorial
From the course: Oracle Cloud Infrastructure Generative AI Professional
Demo: LangChain basics
(bright music) (bright music fades) - [Instructor] In this demo, we'll explore a few LangChain components like models, prompts, chains, and memory. So let us begin with models. We import ChatOCIGenAI class from LangChain community package, which represents OCI Generative AI Service. This class allows us to invoke generative AI service using LangChain. We create LLM object using ChatOCIGenAI class. We pass in the model, name. We pass in the service endpoint, which is a network access point, for generative AI service in a specific region. We pass in the compartment ID. We also pass in the max tokens as 200 because we want to limit the output of the LLM, so let us execute the cell. What we do next is we call upon the invoke method of the LLM and we pass in the question that we want to ask. We've also pass in a temperature parameter, which decides the creativity of the output, and we print the response from the LLM. So let's execute and see what happens. We got back the response from the…
Contents
-
-
-
-
-
(Locked)
OCI Generative AI integrations6m 34s
-
(Locked)
Retrieval augmented generation (RAG)3m 58s
-
(Locked)
Process documents3m 52s
-
(Locked)
Embed and store documents5m 47s
-
(Locked)
Retrieval and generation4m 56s
-
(Locked)
Demo: LangChain basics7m 8s
-
(Locked)
Conversational RAG1m 50s
-
(Locked)
Demo: RAG with Oracle Database 23ai10m 38s
-
(Locked)
-
-