Document
Google Gemini document
Operations
Create
Create a new document
function : Create(name:String, metadata:Collection.Map<String,String>, corpus:Corpus) ~ Document
Parameters
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() ~ Bool
Return
Type | Description |
---|---|
Bool | true if successful, false otherwise |
Get
Get existing document
function : Get(name:String) ~ Document
Parameters
Name | Type | Description |
---|---|---|
name | String | document name |
Return
Type | Description |
---|---|
Document | existing document |
GetCreateTime
Get creation time
method : public : GetCreateTime() ~ System.Time.Date
Return
Type | Description |
---|---|
System.Time.Date | creation time |
GetName
Get the display name
method : public : GetName() ~ String
Return
Type | Description |
---|---|
String | display name |
GetUpdateTime
Get update time
method : public : GetUpdateTime() ~ System.Time.Date
Return
Type | Description |
---|---|
System.Time.Date | update time |
List
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 |
ToString
String representation of the object
method : public : ToString() ~ String
Return
Type | Description |
---|---|
String | string representation |