ChatKonko()Get the namespace of the langchain object.
Build extra kwargs from additional params that were passed in.
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.
ChatKonko Chat large language models API.
To use, you should have the konko python package installed, and the
environment variable KONKO_API_KEY and OPENAI_API_KEY set with your API key.
Any parameters that are valid to be passed to the konko.create call can be passed in, even if not explicitly saved on this class.
Example:
.. code-block:: python
from langchain_community.chat_models import ChatKonko llm = ChatKonko(model="meta-llama/Llama-2-13b-chat-hf")