Gemini chat session
Derived from: Content
OperationsCode example:
session := Chat->New("models/gemini-pro", EndPoint->GetApiKey());
content := session->SendPart(TextPart->New("What is the tallest mountain in the California?"), "user");
content->GetFirstPart()->ToString()->PrintLine();
content := session->SendPart(TextPart->New("How tall is it?"), "user");
content->GetFirstPart()->ToString()->PrintLine();
content := session->SendPart(TextPart->New("Why is it so tall?"), "user");
content->GetFirstPart()->ToString()->PrintLine();
content := session->SendPart(TextPart->New("Where is it located?"), "user");
content->GetFirstPart()->ToString()->PrintLine();
"======"->PrintLine();
session->ToString()->PrintLine();
Get all chat parts
method : public : GetAllParts() ~ Vector<Content>
Type | Description |
---|---|
Vector<Content> | list of all chat parts |
Send chart part
method : public : SendPart(part:Part, role:String) ~ Candidate
Name | Type | Description |
---|---|---|
part | Part | prompt chat part |
role | String | prompt role |
Type | Description |
---|---|
Candidate | prompt response |
String representation of the object
method : public : ToString() ~ String
Type | Description |
---|---|
String | string representation |