Turquoise::Eloquent
Inherits Reference < Object
Constants
MAX_MESSAGES = 10
MODEL_CONFIG = {
model_name: ENV["ELOQUENT_MODEL"],
generation_config: Gemini::GenerationConfig.new(max_output_tokens: 128),
safety_settings: [Gemini::SafetySetting.new(:HarmCategorySexuallyExplicit, :BlockNone), Gemini::SafetySetting.new(:HarmCategoryHateSpeech, :BlockNone), Gemini::SafetySetting.new(:HarmCategoryHarassment, :BlockNone), Gemini::SafetySetting.new(:HarmCategoryDangerousContent, :BlockNone), Gemini::SafetySetting.new(:HarmCategoryCivicIntegrity, :BlockNone)],
tools: [Gemini::Tool.new([Gemini::FunctionDeclaration.new("send_selfie_image", description: "Send a selfie. Call this when you need to send a photo of yourself."), Gemini::FunctionDeclaration.new("send_custom_image", description: "Send an image using AI. Call this when you need to create a custom image, for example when they ask for 'Create an image of a dog'.", parameters: Gemini::Schema.new(type: :object, properties: {"prompt" => Gemini::Schema.new(type: :string, description: "Description of the image you want to generate. Translated to English."), "num_steps" => Gemini::Schema.new(type: :integer, description: "Image quality from 1 to 8. 1 is low quality, 8 is high, default is 4.")}, required: ["prompt"]))])],
}
Constructors
new(chat_id)
SourceInstance methods
chat
Sourcefunction_calling_handler(response : Pointer(Gemini::GenerateContentResponse))
Sourcegenerate(text : String) : String
Sourcemessages
Sourcerandom_selfie
Sourcesend_custom_image(func_call : Gemini::FunctionCall) : Gemini::Part
Sourcesend_selfie_image(func_call : Gemini::FunctionCall) : Gemini::Part
Source