mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-22 18:26:16 +00:00
# What does this PR do?
- Enables users to configure prompts used throughout the File Search /
Vector Retrieval
- Configuration is defined in the Vector Stores Config so they can be
modified at runtime
- Backwards compatible, which means the fields are optional and default
to the previously used values
This is the summary of the new options in the `run.yaml`
```yaml
vector_stores:
file_search_params:
header_template: 'knowledge_search tool found {num_chunks} chunks:\nBEGIN of knowledge_search tool results.\n'
footer_template: 'END of knowledge_search tool results.\n'
context_prompt_params:
chunk_annotation_template: 'Result {index}\nContent: {chunk.content}\nMetadata: {metadata}\n'
context_template: 'The above results were retrieved to help answer the user\'s query: "{query}". Use them as supporting information only in answering this query.{annotation_instruction}\n'
annotation_prompt_params:
enable_annotations: true
annotation_instruction_template: 'Cite sources immediately at the end of sentences before punctuation, using `<|file-id|>` format like \'This is a fact <|file-Cn3MSNn72ENTiiq11Qda4A|>.\'. Do not add
extra punctuation. Use only the file IDs provided, do not invent new ones.'
chunk_annotation_template: '[{index}] {metadata_text} cite as <|{file_id}|>\n{chunk_text}\n'
```
<!-- If resolving an issue, uncomment and update the line below -->
<!-- Closes #[issue-number] -->
## Test Plan
Added tests.
---------
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
547 lines
15 KiB
JSON
Generated
547 lines
15 KiB
JSON
Generated
{
|
|
"test_id": "tests/integration/responses/test_basic_responses.py::test_include_logprobs_non_streaming[txt=openai/gpt-4o]",
|
|
"request": {
|
|
"method": "POST",
|
|
"url": "https://generativelanguage.googleapis.com/v1beta/openai/v1/models",
|
|
"headers": {},
|
|
"body": {},
|
|
"endpoint": "/v1/models",
|
|
"model": ""
|
|
},
|
|
"response": {
|
|
"body": [
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/embedding-gecko-001",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Embedding Gecko"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemini-2.5-flash",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Gemini 2.5 Flash"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemini-2.5-pro",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Gemini 2.5 Pro"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemini-2.0-flash-exp",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Gemini 2.0 Flash Experimental"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemini-2.0-flash",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Gemini 2.0 Flash"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemini-2.0-flash-001",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Gemini 2.0 Flash 001"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemini-2.0-flash-exp-image-generation",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Gemini 2.0 Flash (Image Generation) Experimental"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemini-2.0-flash-lite-001",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Gemini 2.0 Flash-Lite 001"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemini-2.0-flash-lite",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Gemini 2.0 Flash-Lite"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemini-2.0-flash-lite-preview-02-05",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Gemini 2.0 Flash-Lite Preview 02-05"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemini-2.0-flash-lite-preview",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Gemini 2.0 Flash-Lite Preview"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemini-exp-1206",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Gemini Experimental 1206"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemini-2.5-flash-preview-tts",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Gemini 2.5 Flash Preview TTS"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemini-2.5-pro-preview-tts",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Gemini 2.5 Pro Preview TTS"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemma-3-1b-it",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Gemma 3 1B"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemma-3-4b-it",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Gemma 3 4B"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemma-3-12b-it",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Gemma 3 12B"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemma-3-27b-it",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Gemma 3 27B"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemma-3n-e4b-it",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Gemma 3n E4B"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemma-3n-e2b-it",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Gemma 3n E2B"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemini-flash-latest",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Gemini Flash Latest"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemini-flash-lite-latest",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Gemini Flash-Lite Latest"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemini-pro-latest",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Gemini Pro Latest"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemini-2.5-flash-lite",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Gemini 2.5 Flash-Lite"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemini-2.5-flash-image-preview",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Nano Banana"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemini-2.5-flash-image",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Nano Banana"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemini-2.5-flash-preview-09-2025",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Gemini 2.5 Flash Preview Sep 2025"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemini-2.5-flash-lite-preview-09-2025",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Gemini 2.5 Flash-Lite Preview Sep 2025"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemini-3-pro-preview",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Gemini 3 Pro Preview"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemini-3-pro-image-preview",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Nano Banana Pro"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/nano-banana-pro-preview",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Nano Banana Pro"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemini-robotics-er-1.5-preview",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Gemini Robotics-ER 1.5 Preview"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemini-2.5-computer-use-preview-10-2025",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Gemini 2.5 Computer Use Preview 10-2025"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/deep-research-pro-preview-12-2025",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Deep Research Pro Preview (Dec-12-2025)"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/embedding-001",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Embedding 001"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/text-embedding-004",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Text Embedding 004"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemini-embedding-exp-03-07",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Gemini Embedding Experimental 03-07"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemini-embedding-exp",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Gemini Embedding Experimental"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemini-embedding-001",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Gemini Embedding 001"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/aqa",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Model that performs Attributed Question Answering."
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/imagen-4.0-generate-preview-06-06",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Imagen 4 (Preview)"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/imagen-4.0-ultra-generate-preview-06-06",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Imagen 4 Ultra (Preview)"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/imagen-4.0-generate-001",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Imagen 4"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/imagen-4.0-ultra-generate-001",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Imagen 4 Ultra"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/imagen-4.0-fast-generate-001",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Imagen 4 Fast"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/veo-2.0-generate-001",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Veo 2"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/veo-3.0-generate-001",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Veo 3"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/veo-3.0-fast-generate-001",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Veo 3 fast"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/veo-3.1-generate-preview",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Veo 3.1"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/veo-3.1-fast-generate-preview",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Veo 3.1 fast"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemini-2.5-flash-native-audio-latest",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Gemini 2.5 Flash Native Audio Latest"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/gemini-2.5-flash-native-audio-preview-09-2025",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Gemini 2.5 Flash Native Audio Preview 09-2025"
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.model.Model",
|
|
"__data__": {
|
|
"id": "models/lyria-realtime-exp",
|
|
"created": null,
|
|
"object": "model",
|
|
"owned_by": "google",
|
|
"display_name": "Lyria Realtime Experimental"
|
|
}
|
|
}
|
|
],
|
|
"is_streaming": false
|
|
},
|
|
"id_normalization_mapping": {}
|
|
}
|