OpenAITools
, ensure you have the openai
library installed and your OpenAI API key configured.
OpenAITools
and add it to your Agent’s tool list.
Parameter | Type | Default | Description |
---|---|---|---|
api_key | str | None | OpenAI API key. Uses OPENAI_API_KEY env var if not provided |
enable_transcription | bool | True | Enable audio transcription functionality |
enable_image_generation | bool | True | Enable image generation functionality |
enable_speech_generation | bool | True | Enable speech generation functionality |
all | bool | False | Enable all tools when set to True |
transcription_model | str | whisper-1 | Model to use for audio transcription |
text_to_speech_voice | str | alloy | Voice to use for text-to-speech (alloy, echo, fable, onyx, nova, shimmer) |
text_to_speech_model | str | tts-1 | Model to use for text-to-speech (tts-1, tts-1-hd) |
text_to_speech_format | str | mp3 | Audio format for TTS output (mp3, opus, aac, flac, wav, pcm) |
image_model | str | dall-e-3 | Model to use for image generation |
image_quality | str | None | Quality setting for image generation |
image_size | str | None | Size setting for image generation |
image_style | str | None | Style setting for image generation (vivid, natural) |
OpenAITools
toolkit provides the following functions:
Function | Description |
---|---|
transcribe_audio | Transcribes audio from a local file path or a public URL |
generate_image | Generates images based on a text prompt |
generate_speech | Synthesizes speech from text |