- Introduced `image_generate` tool for generating images from text prompts, with options for specifying output file paths and image dimensions. - Updated `image_read` functionality to allow optional provider specification for enhanced image analysis. - Implemented new `GenerateImage` method in the LLM API for seamless integration of image generation capabilities. - Enhanced documentation to include detailed usage examples for both image reading and generation tools. - Updated tests to validate new image generation features and ensure robust functionality across image tools.
44 lines
1.6 KiB
YAML
44 lines
1.6 KiB
YAML
group: llm
|
|
type: process
|
|
entries:
|
|
- name: ChatCompletions
|
|
desc: Universal LLM chat completions that auto-detects connector type and routes accordingly
|
|
args:
|
|
- name: connector
|
|
type: string
|
|
required: true
|
|
desc: Connector ID (supports any type, e.g. openai, anthropic)
|
|
- name: messages
|
|
type: array
|
|
required: true
|
|
desc: "Message array in OpenAI format: each element is an object with role, content (string or multimodal array), and optional name, tool_call_id, tool_calls"
|
|
- name: opts
|
|
type: object
|
|
required: false
|
|
desc: "Completion options: temperature, max_tokens, and other model parameters"
|
|
- name: callback
|
|
type: function
|
|
required: false
|
|
desc: "Streaming callback function that receives data chunks; signature: func(data []byte) int"
|
|
return:
|
|
type: object
|
|
desc: "OpenAI-compatible response: { id, object, created, model, choices: [{ index, message: { role, content, tool_calls? }, finish_reason }], usage? }"
|
|
|
|
- name: ImageGeneration
|
|
desc: Generate an image from a text prompt using an image generation model
|
|
args:
|
|
- name: connector
|
|
type: string
|
|
required: true
|
|
desc: Connector ID for an image generation model (e.g. dall-e-3)
|
|
- name: prompt
|
|
type: string
|
|
required: true
|
|
desc: Text description of the image to generate
|
|
- name: opts
|
|
type: object
|
|
required: false
|
|
desc: "Generation options: size (1024x1024), quality, style, n, etc."
|
|
return:
|
|
type: object
|
|
desc: "Image generation result: { image (base64), format (png) }"
|