Skip to main content
HasteKit SDK supports generating text content with various LLM providers like OpenAI, Anthropic, and Gemini.

Invoke the model

You can then invoke the model with parameters like model identifer, system instruction, temperature, topP, user message, etc.

Response

The model returns an array of outputs. The output can be of various types - text, images, reasoning etc. You can access the text content like this:

Streaming Responses

For real-time applications, the SDK supports streaming responses. This returns a channel that yields chunks of the response as they are generated by the LLM.

Using Multi-turn Conversation

Instead of a single string, you can pass a list of messages for context-aware conversations.