ChatOctoAI()Get the namespace of the langchain object.
Build extra kwargs from additional params that were passed in.
Use tenacity to retry the completion call.
Get the tokens present in the text with tiktoken package.
Calculate num tokens for gpt-3.5-turbo and gpt-4 with tiktoken package.
Bind functions (and other objects) to this chat model.
OctoAI Chat large language models.
See https://octo.ai/ for information about OctoAI.
To use, you should have the openai python package installed and the
environment variable OCTOAI_API_TOKEN set with your API token.
Alternatively, you can use the octoai_api_token keyword argument.
Any parameters that are valid to be passed to the openai.create call can be passed
in, even if not explicitly saved on this class.
Example:
.. code-block:: python
from langchain_community.chat_models import ChatOctoAI chat = ChatOctoAI(model_name="mixtral-8x7b-instruct")