adapters
#
Adapters are used to adapt LangChain models to other APIs.
LangChain integrates with many model providers. While LangChain has its own message and model APIs, LangChain has also made it as easy as possible to explore other models by exposing an adapter to adapt LangChain models to the other APIs, as to the OpenAI API.
Classes
Chat. |
|
Chat completion. |
|
Chat completion chunk. |
|
Chat completions. |
|
Choice. |
|
Choice chunk. |
|
Completions. |
|
Allows a BaseModel to return its fields by string variable indexing. |
Functions
|
Async version of enumerate function. |
Convert a dictionary to a LangChain message. |
|
Convert a LangChain message to a dictionary. |
|
Convert messages to a list of lists of dictionaries for fine-tuning. |
|
|
Convert dictionaries representing OpenAI messages to LangChain format. |