Skip to content

Instantly share code, notes, and snippets.

@serefyarar
Created November 22, 2023 16:29
Show Gist options
  • Save serefyarar/9c53775f085a37c9595205b5150cb656 to your computer and use it in GitHub Desktop.
Save serefyarar/9c53775f085a37c9595205b5150cb656 to your computer and use it in GitHub Desktop.
type EmbeddingContext {
# context is the transformed representation of a node before obtaining embeddings.
# This can include the node's content with added context information for embedding tasks like summaries, etc.
# Raw document is used if it's null.
context: String @string(maxLength:100000000)
# contextDescription is a human-readable description of the context.
contextDescription: String! @string(maxLength:600)
# category is the category or namespace for the embedding.
# Example values: "summaries", "knowledge_graph", "document", etc.
category: String! @string(maxLength:60)
}
type Embedding @createModel(accountRelation: LIST, description: "Vector embeddings for an index item"){
modelName: String! @string(maxLength:600)
vector: [Float!]! @list(maxLength: 8192)
context: EmbeddingContext!
indexId: StreamID! @documentReference(model: "Index")
index: Index! @relationDocument(property: "indexId")
itemId: StreamID! @documentReference(model: "Node")
item: Node! @relationDocument(property: "itemId")
createdAt: DateTime!
updatedAt: DateTime
deletedAt: DateTime
controllerDID: DID! @documentAccount
version: CommitID! @documentVersion
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment