All Bundles

Document

Google Gemini document

Derived from: OAuthEndPoint

Operations

Create

Create a new document

function : Create(name:String, metadata:Collection.Map<String,String>, corpus:Corpus) ~ Document
Parameters
NameTypeDescription
nameStringdocument name
metadataMap<String,String>document metadata
corpusCorpuscorpus to attach document

Return
TypeDescription
Documentnew Document

Delete

Delete existing document

method : public : Delete() ~ Bool
Return
TypeDescription
Booltrue if successful, false otherwise

Get

Get existing document

function : Get(name:String) ~ Document
Parameters
NameTypeDescription
nameStringdocument name

Return
TypeDescription
Documentexisting document

GetCreateTime

Get creation time

method : public : GetCreateTime() ~ System.Time.Date
Return
TypeDescription
Datecreation time

GetId

Get document ID

method : public : GetId() ~ String
Return
TypeDescription
Stringdocument ID

GetName

Get the display name

method : public : GetName() ~ String
Return
TypeDescription
Stringdisplay name

GetUpdateTime

Get update time

method : public : GetUpdateTime() ~ System.Time.Date
Return
TypeDescription
Dateupdate time

List

Get all existing documents

function : List(corpus:Corpus) ~ Collection.Vector<Document>
Parameters
NameTypeDescription
corpusCorpuscorpus of documents to list

Return
TypeDescription
Vector<Document>list of documents

Query

Query the corpus

method : public : Query(query:String) ~ Vector<Collection.Tuple.Triplet<FloatRef,String,Map<String,String>>>
Parameters
NameTypeDescription
queryStringstring query

Return
TypeDescription
Triplet<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
TypeDescription
Stringstring representation