diff --git a/README.md b/README.md index 9e93c92..a5c9e02 100644 --- a/README.md +++ b/README.md @@ -16,9 +16,16 @@ output. You might even get results back. from kor.extraction import Extractor from kor.nodes import Object, Text -from langchain.chat_models import ChatOpenAI +from langchain import ChatOpenAI + +llm = ChatOpenAI(model_name="gpt-3.5-turbo", + temperature = 0, + max_tokens = 2000, + frequency_penalty = 0, + presence_penalty = 0, + top_p = 1.0, +) -llm = ChatOpenAI(model_name="gpt-3.5-turbo") model = Extractor(llm) schema = Object( diff --git a/docs/source/index.rst b/docs/source/index.rst index 695cac0..8b065d5 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -18,11 +18,18 @@ Translate user input into structured JSON to use for an API **request**: .. code-block:: python + from langchain import ChatOpenAI from kor.extraction import Extractor from kor.nodes import Object, Text - from kor.llms import OpenAIChatCompletion - llm = OpenAIChatCompletion(model="gpt-3.5-turbo") + llm = ChatOpenAI(model_name="gpt-3.5-turbo", + temperature = 0, + max_tokens = 2000, + frequency_penalty = 0, + presence_penalty = 0, + top_p = 1.0, + ) + model = Extractor(llm) schema = Object(