Installation and Setup



You must first follow the Access & SDK Installation guide


  1. Install Konko:
    pip install konko
  2. Install LangChain:
    pip install langchain


To verify the successful installation and setup, run the following in your Python environment:

from langchain.chat_models import ChatKonko
from langchain.schema import AIMessage, HumanMessage, SystemMessage
chat = ChatKonko(max_tokens=800, model='nousresearch/nous-hermes-llama2-13b')
messages = [
    SystemMessage(content="You are a helpful assistant."),
    HumanMessage(content="Generate a Product Description for Apple Iphone 15"),
response = chat(messages)

If there are no errors, your setup is complete, and you're ready to start using Konko with LangChain!

What’s Next