ark::openai
Classes
-
ark::openai::OpenAiTest
Fixture that creates a fake OpenAI server to do request/responses from. -
ark::openai::ChatMessage
Represents a single ‘message’ within a conversation/chat session with OpenAI. -
ark::openai::ChatRequest
This structure represents a request to the ‘chat’ completions API for OpenAI, which is commonly used for things like ‘chatting’ or ‘asking GPT questions’. -
ark::openai::OpenAiRequestConfig
Common configuration used for all OpenAI API requests. -
ark::openai::TextToSpeechRequest
Represents a request for a text-to-speech (to convert some input message into audio). -
ark::openai::TranscribeRequest
Represents a request for a text-to-speech (to convert some input message into audio).
Functions
Declared in “ark/openai/openai_chat.hh”:
- ChatMessage make_chat_request(const OpenAiRequestConfig & config, const ChatRequest & request)
Makes a request to OpenAI with the given ChatRequest object, and returns a chosen chat message as a response. Throws if it times out.
Declared in “ark/openai/openai_transcribe.hh”:
- std::string make_transcribe_request(const OpenAiRequestConfig & config, const TranscribeRequest & request)
Makes a request to OpenAI with the given speech-to-text request. The response will be a byte buffer containing the data in the format you requestd. Throws on error.
Declared in “ark/openai/openai_tts.hh”:
- core::ByteBuffer make_text_to_speech_request(const OpenAiRequestConfig & config, const TextToSpeechRequest & request)
Makes a request to OpenAI with teh given text-to-speech request. The response will be a byte buffer containing the data in the format you requestd. Throws on error.