Installation and Setup



You must first follow the Access & SDK Installation guide


  1. Install Konko:
    pip install konko
  2. Install LlamaIndex:
    pip install llama-index

Before proceeding, ensure that you've set up the required environment variables.
export KONKO_API_KEY={your_KONKO_API_KEY_here}
export OPENAI_API_KEY={your_OPENAI_API_KEY_here} #Optional


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

from llama_index.llms import Konko
from llama_index.llms.base import ChatMessage

llm = Konko(model="meta-llama/llama-2-13b-chat")
message = ChatMessage(role="user", content="Generate a Product Description for Apple Iphone 15")
response =[message])

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

What’s Next