Bundle Google Gemini corpus APIs (-lib gemini)
Document
Google Gemini document
Inherits: OAuthEndPoint
Operations
Create # function
Create a new document
function : Create(name:String, metadata:Collection.Map<String,String>, corpus:Corpus) ~ DocumentParameters
| Name | Type | Description |
|---|---|---|
| name | String | document name |
| metadata | CollectionMap<String,String> | document metadata |
| corpus | Corpus | corpus to attach document |
Return
| Type | Description |
|---|---|
| Document | new Document |
Delete #
Delete existing document
method : public : Delete() ~ BoolReturn
| Type | Description |
|---|---|
| Bool | true if successful, false otherwise |
Get # function
Get existing document
function : Get(name:String) ~ DocumentParameters
| Name | Type | Description |
|---|---|---|
| name | String | document name |
Return
| Type | Description |
|---|---|
| Document | existing document |
GetCreateTime #
Get creation time
method : public : GetCreateTime() ~ System.Time.DateReturn
| Type | Description |
|---|---|
| Date | creation time |
GetName #
Get the display name
method : public : GetName() ~ StringReturn
| Type | Description |
|---|---|
| String | display name |
GetUpdateTime #
Get update time
method : public : GetUpdateTime() ~ System.Time.DateReturn
| Type | Description |
|---|---|
| Date | update time |
List # function
Get all existing documents
function : List(corpus:Corpus) ~ Collection.Vector<Document>Parameters
| Name | Type | Description |
|---|---|---|
| corpus | Corpus | corpus of documents to list |
Return
| Type | Description |
|---|---|
| CollectionVector<Document> | list of documents |
Query #
Query the corpus
method : public : Query(query:String) ~ Vector<Collection.Tuple.Triplet<FloatRef,String,Map<String,String>>>Parameters
| Name | Type | Description |
|---|---|---|
| query | String | string query |
Return
| Type | Description |
|---|---|
| Vector<CollectionTupleTriplet<FloatRef,String,Map<String,String>>> | query results as triple, 1) relevance, 2) string content, 3) content metadata |