The official Python SDK for Honcho AI, designed for an optimized developer experience. It provides convenient access to Honcho's AI models, including chat completions and other services. The current version is 2.1.1, and it follows an active release cadence with regular updates.
pip install honcho-aiVerified import paths — ran on the pinned version, not inferred.
This quickstart initializes the Honcho client using an API key from an environment variable and makes a simple chat completion request. Replace the model name with an appropriate one if 'llama-3.8b-plastic-v2' is not available or desired.
Set `export HONCHO_API_KEY='your_key'` in your shell or use `honcho_client = Honcho(api_key=os.environ.get('HONCHO_API_KEY'))`.Consult Honcho documentation or the API's model listing for valid model identifiers. Common models include 'llama-3.8b-plastic-v2' or 'mixtral-8x7b-plastic-v2'.
Always pin to specific minor versions (`honcho-ai~=2.1.0`) in production to control updates, and thoroughly test applications after upgrading to a new `honcho-ai` version.
Refer to the method's return type hints or examples to correctly parse the response object. Use IDE auto-completion for easier exploration of attributes.
Ensure the `HONCHO_API_KEY` environment variable is set or pass the `api_key` parameter correctly during client initialization: `Honcho(api_key="your_key")`.
The `Honcho` client is located in the `client` submodule. Use `from honcho.client import Honcho` instead.
Verify the model name against the Honcho documentation or available models. Common models include 'llama-3.8b-plastic-v2' or 'mixtral-8x7b-plastic-v2'.