LangChain SDK
Use LangChain with Keywords AI
You can use the chat completion endpoint with LangChain’s ChatOpenAI
LLM under two lines of code change.
In extra_body
, you can pass in any OpenAI parameters.
To use Keywords AI parameters, you can specify an extra_body
object within model_kwargs
. In the above example, customer_identifier
is the Keywords AI parameter. These parameters will take precedence over the OpenAI parameters if they are conflicting.
You can use the chat completion endpoint with LangChain’s ChatOpenAI
LLM under two lines of code change.
In extra_body
, you can pass in any OpenAI parameters.
To use Keywords AI parameters, you can specify an extra_body
object within model_kwargs
. In the above example, customer_identifier
is the Keywords AI parameter. These parameters will take precedence over the OpenAI parameters if they are conflicting.