mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-28 02:53:30 +00:00
docs: add documentation for RAGDocument (#1693)
# What does this PR do? ## Test Plan
This commit is contained in:
parent
5418e63919
commit
113f3a259c
3 changed files with 25 additions and 5 deletions
15
docs/_static/llama-stack-spec.html
vendored
15
docs/_static/llama-stack-spec.html
vendored
|
@ -7787,7 +7787,8 @@
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"document_id": {
|
"document_id": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"description": "The unique identifier for the document."
|
||||||
},
|
},
|
||||||
"content": {
|
"content": {
|
||||||
"oneOf": [
|
"oneOf": [
|
||||||
|
@ -7806,10 +7807,12 @@
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/URL"
|
"$ref": "#/components/schemas/URL"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"description": "The content of the document."
|
||||||
},
|
},
|
||||||
"mime_type": {
|
"mime_type": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"description": "The MIME type of the document."
|
||||||
},
|
},
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -7834,7 +7837,8 @@
|
||||||
"type": "object"
|
"type": "object"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
"description": "Additional metadata for the document."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
|
@ -7843,7 +7847,8 @@
|
||||||
"content",
|
"content",
|
||||||
"metadata"
|
"metadata"
|
||||||
],
|
],
|
||||||
"title": "RAGDocument"
|
"title": "RAGDocument",
|
||||||
|
"description": "A document to be used for document ingestion in the RAG Tool."
|
||||||
},
|
},
|
||||||
"InsertRequest": {
|
"InsertRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
|
6
docs/_static/llama-stack-spec.yaml
vendored
6
docs/_static/llama-stack-spec.yaml
vendored
|
@ -5375,6 +5375,7 @@ components:
|
||||||
properties:
|
properties:
|
||||||
document_id:
|
document_id:
|
||||||
type: string
|
type: string
|
||||||
|
description: The unique identifier for the document.
|
||||||
content:
|
content:
|
||||||
oneOf:
|
oneOf:
|
||||||
- type: string
|
- type: string
|
||||||
|
@ -5383,8 +5384,10 @@ components:
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/InterleavedContentItem'
|
$ref: '#/components/schemas/InterleavedContentItem'
|
||||||
- $ref: '#/components/schemas/URL'
|
- $ref: '#/components/schemas/URL'
|
||||||
|
description: The content of the document.
|
||||||
mime_type:
|
mime_type:
|
||||||
type: string
|
type: string
|
||||||
|
description: The MIME type of the document.
|
||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
|
@ -5395,12 +5398,15 @@ components:
|
||||||
- type: string
|
- type: string
|
||||||
- type: array
|
- type: array
|
||||||
- type: object
|
- type: object
|
||||||
|
description: Additional metadata for the document.
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
required:
|
required:
|
||||||
- document_id
|
- document_id
|
||||||
- content
|
- content
|
||||||
- metadata
|
- metadata
|
||||||
title: RAGDocument
|
title: RAGDocument
|
||||||
|
description: >-
|
||||||
|
A document to be used for document ingestion in the RAG Tool.
|
||||||
InsertRequest:
|
InsertRequest:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
|
|
@ -17,6 +17,15 @@ from llama_stack.schema_utils import json_schema_type, register_schema, webmetho
|
||||||
|
|
||||||
@json_schema_type
|
@json_schema_type
|
||||||
class RAGDocument(BaseModel):
|
class RAGDocument(BaseModel):
|
||||||
|
"""
|
||||||
|
A document to be used for document ingestion in the RAG Tool.
|
||||||
|
|
||||||
|
:param document_id: The unique identifier for the document.
|
||||||
|
:param content: The content of the document.
|
||||||
|
:param mime_type: The MIME type of the document.
|
||||||
|
:param metadata: Additional metadata for the document.
|
||||||
|
"""
|
||||||
|
|
||||||
document_id: str
|
document_id: str
|
||||||
content: InterleavedContent | URL
|
content: InterleavedContent | URL
|
||||||
mime_type: str | None = None
|
mime_type: str | None = None
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue