class Turquoise::Eloquent
- Turquoise::Eloquent
- Reference
- Object
Defined in:
turquoise/eloquent.crturquoise/eloquent/api.cr
Constant Summary
-
ENDPOINT =
"https://api.cloudflare.com/client/v4/accounts/#{ENV["ELOQUENT_ACCOUNT_ID"]}/ai/run/"
-
HEADERS =
HTTP::Headers {"Authorization" => "Bearer #{ENV["ELOQUENT_API_KEY"]}", "Content-Type" => "application/json"}
-
MAX_MESSAGES =
6
-
MAX_TOKENS =
nil
-
MODEL =
{text_generation: "@hf/nousresearch/hermes-2-pro-mistral-7b", text_to_image: "@cf/stabilityai/stable-diffusion-xl-base-1.0"}
Constructors
Instance Method Summary
- #chat : Models::Chat
-
#clear
Reset chat messages.
- #completion(text : String) : Chat::Completion::Message
- #data : Chat::Request
- #data=(data : Chat::Request)
- #random_selfie
- #send_custom_image(tool_call : Chat::Tool::Call, message : Pointer(Chat::Completion::Message))
- #send_selfie_image(tool_call : Chat::Tool::Call, message : Pointer(Chat::Completion::Message))
-
#system_role
TODO internationalization