Expand description
OpenAI audio transcription and GPT Image generation.
OpenAi owns an API key and exposes the direct OpenAI API operations
currently needed by Kennedy: gpt-4o-transcribe audio transcription and
gpt-image-2 image generation. The crate does not persist credentials,
requests, responses, or generated media.
Structs§
- Audio
Input - One in-memory audio file accepted by
gpt-4o-transcribe. - Generated
Image - One generated image held in memory.
- Image
Generation - Normalized single-image GPT Image 2 result.
- Image
Generation Request - One GPT Image 2 text-to-image request.
- Image
Token Details - Text and image token detail for GPT Image usage.
- Image
Usage - Token usage returned by GPT Image.
- OpenAi
- Cloneable asynchronous OpenAI client for transcription and image generation.
- Transcription
- Normalized
gpt-4o-transcriberesult. - Transcription
Request - One audio transcription request.
- Transcription
Token Details - Modality detail for token-billed audio transcription input.
- Transcription
Token Usage - Token-billed transcription usage.
Enums§
- Error
- A local validation, transport, provider, or protocol failure.
- Image
Background - Background selection supported by GPT Image 2.
- Image
Format - GPT Image output file format.
- Image
Quality - GPT Image rendering quality.
- Image
Size - Generated image dimensions.
- Moderation
- Provider content-moderation level.
- Transcription
Usage - Usage returned for a transcription request.
Constants§
- DEFAULT_
TRANSCRIPTION_ PROMPT - Default transcription guidance preserving Kennedy’s current behavior.
- GPT_
4O_ TRANSCRIBE - OpenAI model used for audio transcription.
- GPT_
IMAGE_ 2 - Latest GPT Image model used for image generation.
Type Aliases§
- Result
- The result type returned by this crate.