mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-17 22:47:14 +00:00
Merge branch 'main' into inference_refactor
This commit is contained in:
commit
fadb7deae5
79 changed files with 1547 additions and 2026 deletions
|
|
@ -886,7 +886,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 49,
|
||||
"execution_count": null,
|
||||
"id": "9496f75c",
|
||||
"metadata": {
|
||||
"colab": {
|
||||
|
|
@ -896,30 +896,7 @@
|
|||
"id": "9496f75c",
|
||||
"outputId": "fb9a0610-896d-4ec1-8aac-691222db5ca0"
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"User> hello\n",
|
||||
"> Response: Hello. How can I assist you today?\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"ename": "KeyboardInterrupt",
|
||||
"evalue": "Interrupted by user",
|
||||
"output_type": "error",
|
||||
"traceback": [
|
||||
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
||||
"\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)",
|
||||
"\u001b[0;32m<ipython-input-49-bec9fae1b65b>\u001b[0m in \u001b[0;36m<cell line: 26>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 24\u001b[0m \u001b[0mconversation_history\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0massistant_message\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 25\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 26\u001b[0;31m \u001b[0mchat_loop\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
|
||||
"\u001b[0;32m<ipython-input-49-bec9fae1b65b>\u001b[0m in \u001b[0;36mchat_loop\u001b[0;34m()\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0mconversation_history\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;32mwhile\u001b[0m \u001b[0;32mTrue\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 6\u001b[0;31m \u001b[0muser_input\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0minput\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'User> '\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 7\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0muser_input\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mlower\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32min\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0;34m'exit'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'quit'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'bye'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 8\u001b[0m \u001b[0mcprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'Ending conversation. Goodbye!'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'yellow'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
||||
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/ipykernel/kernelbase.py\u001b[0m in \u001b[0;36mraw_input\u001b[0;34m(self, prompt)\u001b[0m\n\u001b[1;32m 849\u001b[0m \u001b[0;34m\"raw_input was called, but this frontend does not support input requests.\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 850\u001b[0m )\n\u001b[0;32m--> 851\u001b[0;31m return self._input_request(str(prompt),\n\u001b[0m\u001b[1;32m 852\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_parent_ident\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 853\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_parent_header\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
||||
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/ipykernel/kernelbase.py\u001b[0m in \u001b[0;36m_input_request\u001b[0;34m(self, prompt, ident, parent, password)\u001b[0m\n\u001b[1;32m 893\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mKeyboardInterrupt\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 894\u001b[0m \u001b[0;31m# re-raise KeyboardInterrupt, to truncate traceback\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 895\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mKeyboardInterrupt\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Interrupted by user\"\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 896\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mException\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 897\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mlog\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mwarning\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Invalid Message:\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mexc_info\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
||||
"\u001b[0;31mKeyboardInterrupt\u001b[0m: Interrupted by user"
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from termcolor import cprint\n",
|
||||
"\n",
|
||||
|
|
@ -1026,7 +1003,8 @@
|
|||
},
|
||||
"source": [
|
||||
"### 2.0. Structured Decoding\n",
|
||||
"- You may use `response_format` to get a JSON structured output from the model."
|
||||
"\n",
|
||||
"You can use `response_format` to force the model into a \"guided decode\" mode where model tokens are forced to abide by a certain grammar. Currently only JSON grammars are supported."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -1097,7 +1075,8 @@
|
|||
},
|
||||
"source": [
|
||||
"### 2.1. Safety API\n",
|
||||
"- Llama Stack provides a Shield system that can be applied at multiple touchpoints."
|
||||
"\n",
|
||||
"Llama Stack provides Safety guardrails which can be applied at multiple touchpoints within an agentic application. "
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -1234,15 +1213,14 @@
|
|||
"]\n",
|
||||
"\n",
|
||||
"for p in safe_examples + unsafe_examples:\n",
|
||||
" print(f\"Running on input : {p}\")\n",
|
||||
" for message in [{\"content\": [p], \"role\": \"user\"}]:\n",
|
||||
" response = client.safety.run_shield(\n",
|
||||
" messages=[message],\n",
|
||||
" shield_id=available_shields[0],\n",
|
||||
" params={},\n",
|
||||
" )\n",
|
||||
"\n",
|
||||
" pprint(response)"
|
||||
" print(f\"Checking if input is safe: {p}\")\n",
|
||||
" message = {\"content\": p, \"role\": \"user\"}\n",
|
||||
" response = client.safety.run_shield(\n",
|
||||
" messages=[message],\n",
|
||||
" shield_id=available_shields[0],\n",
|
||||
" params={},\n",
|
||||
" )\n",
|
||||
" pprint(response)"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,9 +23,10 @@ from llama_models import schema_utils
|
|||
# generation though, we need the full definitions and implementations from the
|
||||
# (json-strong-typing) package.
|
||||
|
||||
from .strong_typing.schema import json_schema_type
|
||||
from .strong_typing.schema import json_schema_type, register_schema
|
||||
|
||||
schema_utils.json_schema_type = json_schema_type
|
||||
schema_utils.register_schema = register_schema
|
||||
|
||||
from llama_stack.apis.version import LLAMA_STACK_API_VERSION # noqa: E402
|
||||
from llama_stack.distribution.stack import LlamaStack # noqa: E402
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -275,11 +275,9 @@ components:
|
|||
content:
|
||||
oneOf:
|
||||
- type: string
|
||||
- $ref: '#/components/schemas/ImageMedia'
|
||||
- $ref: '#/components/schemas/InterleavedContentItem'
|
||||
- items:
|
||||
oneOf:
|
||||
- type: string
|
||||
- $ref: '#/components/schemas/ImageMedia'
|
||||
$ref: '#/components/schemas/InterleavedContentItem'
|
||||
type: array
|
||||
- $ref: '#/components/schemas/URL'
|
||||
mime_type:
|
||||
|
|
@ -353,14 +351,7 @@ components:
|
|||
properties:
|
||||
content_batch:
|
||||
items:
|
||||
oneOf:
|
||||
- type: string
|
||||
- $ref: '#/components/schemas/ImageMedia'
|
||||
- items:
|
||||
oneOf:
|
||||
- type: string
|
||||
- $ref: '#/components/schemas/ImageMedia'
|
||||
type: array
|
||||
$ref: '#/components/schemas/InterleavedContent'
|
||||
type: array
|
||||
logprobs:
|
||||
additionalProperties: false
|
||||
|
|
@ -575,14 +566,7 @@ components:
|
|||
additionalProperties: false
|
||||
properties:
|
||||
content:
|
||||
oneOf:
|
||||
- type: string
|
||||
- $ref: '#/components/schemas/ImageMedia'
|
||||
- items:
|
||||
oneOf:
|
||||
- type: string
|
||||
- $ref: '#/components/schemas/ImageMedia'
|
||||
type: array
|
||||
$ref: '#/components/schemas/InterleavedContent'
|
||||
role:
|
||||
const: assistant
|
||||
default: assistant
|
||||
|
|
@ -603,14 +587,7 @@ components:
|
|||
additionalProperties: false
|
||||
properties:
|
||||
content:
|
||||
oneOf:
|
||||
- type: string
|
||||
- $ref: '#/components/schemas/ImageMedia'
|
||||
- items:
|
||||
oneOf:
|
||||
- type: string
|
||||
- $ref: '#/components/schemas/ImageMedia'
|
||||
type: array
|
||||
$ref: '#/components/schemas/InterleavedContent'
|
||||
logprobs:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
|
|
@ -788,97 +765,7 @@ components:
|
|||
properties:
|
||||
dataset_schema:
|
||||
additionalProperties:
|
||||
oneOf:
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: string
|
||||
default: string
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: number
|
||||
default: number
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: boolean
|
||||
default: boolean
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: array
|
||||
default: array
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: object
|
||||
default: object
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: json
|
||||
default: json
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: union
|
||||
default: union
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: chat_completion_input
|
||||
default: chat_completion_input
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: completion_input
|
||||
default: completion_input
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: agent_turn_input
|
||||
default: agent_turn_input
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
$ref: '#/components/schemas/ParamType'
|
||||
type: object
|
||||
identifier:
|
||||
type: string
|
||||
|
|
@ -951,14 +838,7 @@ components:
|
|||
properties:
|
||||
contents:
|
||||
items:
|
||||
oneOf:
|
||||
- type: string
|
||||
- $ref: '#/components/schemas/ImageMedia'
|
||||
- items:
|
||||
oneOf:
|
||||
- type: string
|
||||
- $ref: '#/components/schemas/ImageMedia'
|
||||
type: array
|
||||
$ref: '#/components/schemas/InterleavedContent'
|
||||
type: array
|
||||
model_id:
|
||||
type: string
|
||||
|
|
@ -1159,22 +1039,20 @@ components:
|
|||
required:
|
||||
- status
|
||||
type: object
|
||||
ImageMedia:
|
||||
ImageContentItem:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
image:
|
||||
oneOf:
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
format:
|
||||
type: string
|
||||
format_description:
|
||||
type: string
|
||||
title: This class represents an image object. To create
|
||||
type: object
|
||||
- $ref: '#/components/schemas/URL'
|
||||
data:
|
||||
contentEncoding: base64
|
||||
type: string
|
||||
type:
|
||||
const: image
|
||||
default: image
|
||||
type: string
|
||||
url:
|
||||
$ref: '#/components/schemas/URL'
|
||||
required:
|
||||
- image
|
||||
- type
|
||||
type: object
|
||||
InferenceStep:
|
||||
additionalProperties: false
|
||||
|
|
@ -1216,6 +1094,17 @@ components:
|
|||
- bank_id
|
||||
- documents
|
||||
type: object
|
||||
InterleavedContent:
|
||||
oneOf:
|
||||
- type: string
|
||||
- $ref: '#/components/schemas/InterleavedContentItem'
|
||||
- items:
|
||||
$ref: '#/components/schemas/InterleavedContentItem'
|
||||
type: array
|
||||
InterleavedContentItem:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/ImageContentItem'
|
||||
- $ref: '#/components/schemas/TextContentItem'
|
||||
Job:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
|
|
@ -1395,11 +1284,9 @@ components:
|
|||
content:
|
||||
oneOf:
|
||||
- type: string
|
||||
- $ref: '#/components/schemas/ImageMedia'
|
||||
- $ref: '#/components/schemas/InterleavedContentItem'
|
||||
- items:
|
||||
oneOf:
|
||||
- type: string
|
||||
- $ref: '#/components/schemas/ImageMedia'
|
||||
$ref: '#/components/schemas/InterleavedContentItem'
|
||||
type: array
|
||||
- $ref: '#/components/schemas/URL'
|
||||
document_id:
|
||||
|
|
@ -1428,14 +1315,7 @@ components:
|
|||
format: date-time
|
||||
type: string
|
||||
inserted_context:
|
||||
oneOf:
|
||||
- type: string
|
||||
- $ref: '#/components/schemas/ImageMedia'
|
||||
- items:
|
||||
oneOf:
|
||||
- type: string
|
||||
- $ref: '#/components/schemas/ImageMedia'
|
||||
type: array
|
||||
$ref: '#/components/schemas/InterleavedContent'
|
||||
memory_bank_ids:
|
||||
items:
|
||||
type: string
|
||||
|
|
@ -1731,6 +1611,98 @@ components:
|
|||
- rows
|
||||
- total_count
|
||||
type: object
|
||||
ParamType:
|
||||
oneOf:
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: string
|
||||
default: string
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: number
|
||||
default: number
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: boolean
|
||||
default: boolean
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: array
|
||||
default: array
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: object
|
||||
default: object
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: json
|
||||
default: json
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: union
|
||||
default: union
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: chat_completion_input
|
||||
default: chat_completion_input
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: completion_input
|
||||
default: completion_input
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: agent_turn_input
|
||||
default: agent_turn_input
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
PhotogenToolDefinition:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
|
|
@ -1918,14 +1890,7 @@ components:
|
|||
- type: object
|
||||
type: object
|
||||
query:
|
||||
oneOf:
|
||||
- type: string
|
||||
- $ref: '#/components/schemas/ImageMedia'
|
||||
- items:
|
||||
oneOf:
|
||||
- type: string
|
||||
- $ref: '#/components/schemas/ImageMedia'
|
||||
type: array
|
||||
$ref: '#/components/schemas/InterleavedContent'
|
||||
required:
|
||||
- bank_id
|
||||
- query
|
||||
|
|
@ -1938,14 +1903,7 @@ components:
|
|||
additionalProperties: false
|
||||
properties:
|
||||
content:
|
||||
oneOf:
|
||||
- type: string
|
||||
- $ref: '#/components/schemas/ImageMedia'
|
||||
- items:
|
||||
oneOf:
|
||||
- type: string
|
||||
- $ref: '#/components/schemas/ImageMedia'
|
||||
type: array
|
||||
$ref: '#/components/schemas/InterleavedContent'
|
||||
document_id:
|
||||
type: string
|
||||
token_count:
|
||||
|
|
@ -2022,97 +1980,7 @@ components:
|
|||
type: string
|
||||
dataset_schema:
|
||||
additionalProperties:
|
||||
oneOf:
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: string
|
||||
default: string
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: number
|
||||
default: number
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: boolean
|
||||
default: boolean
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: array
|
||||
default: array
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: object
|
||||
default: object
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: json
|
||||
default: json
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: union
|
||||
default: union
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: chat_completion_input
|
||||
default: chat_completion_input
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: completion_input
|
||||
default: completion_input
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: agent_turn_input
|
||||
default: agent_turn_input
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
$ref: '#/components/schemas/ParamType'
|
||||
type: object
|
||||
metadata:
|
||||
additionalProperties:
|
||||
|
|
@ -2223,97 +2091,7 @@ components:
|
|||
provider_scoring_fn_id:
|
||||
type: string
|
||||
return_type:
|
||||
oneOf:
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: string
|
||||
default: string
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: number
|
||||
default: number
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: boolean
|
||||
default: boolean
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: array
|
||||
default: array
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: object
|
||||
default: object
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: json
|
||||
default: json
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: union
|
||||
default: union
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: chat_completion_input
|
||||
default: chat_completion_input
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: completion_input
|
||||
default: completion_input
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: agent_turn_input
|
||||
default: agent_turn_input
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
$ref: '#/components/schemas/ParamType'
|
||||
scoring_fn_id:
|
||||
type: string
|
||||
required:
|
||||
|
|
@ -2623,97 +2401,7 @@ components:
|
|||
provider_resource_id:
|
||||
type: string
|
||||
return_type:
|
||||
oneOf:
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: string
|
||||
default: string
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: number
|
||||
default: number
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: boolean
|
||||
default: boolean
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: array
|
||||
default: array
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: object
|
||||
default: object
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: json
|
||||
default: json
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: union
|
||||
default: union
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: chat_completion_input
|
||||
default: chat_completion_input
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: completion_input
|
||||
default: completion_input
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
- additionalProperties: false
|
||||
properties:
|
||||
type:
|
||||
const: agent_turn_input
|
||||
default: agent_turn_input
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
$ref: '#/components/schemas/ParamType'
|
||||
type:
|
||||
const: scoring_function
|
||||
default: scoring_function
|
||||
|
|
@ -3112,14 +2800,7 @@ components:
|
|||
additionalProperties: false
|
||||
properties:
|
||||
content:
|
||||
oneOf:
|
||||
- type: string
|
||||
- $ref: '#/components/schemas/ImageMedia'
|
||||
- items:
|
||||
oneOf:
|
||||
- type: string
|
||||
- $ref: '#/components/schemas/ImageMedia'
|
||||
type: array
|
||||
$ref: '#/components/schemas/InterleavedContent'
|
||||
role:
|
||||
const: system
|
||||
default: system
|
||||
|
|
@ -3128,6 +2809,19 @@ components:
|
|||
- role
|
||||
- content
|
||||
type: object
|
||||
TextContentItem:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
text:
|
||||
type: string
|
||||
type:
|
||||
const: text
|
||||
default: text
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
- text
|
||||
type: object
|
||||
TokenLogProbs:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
|
|
@ -3293,14 +2987,7 @@ components:
|
|||
call_id:
|
||||
type: string
|
||||
content:
|
||||
oneOf:
|
||||
- type: string
|
||||
- $ref: '#/components/schemas/ImageMedia'
|
||||
- items:
|
||||
oneOf:
|
||||
- type: string
|
||||
- $ref: '#/components/schemas/ImageMedia'
|
||||
type: array
|
||||
$ref: '#/components/schemas/InterleavedContent'
|
||||
tool_name:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/BuiltinTool'
|
||||
|
|
@ -3316,14 +3003,7 @@ components:
|
|||
call_id:
|
||||
type: string
|
||||
content:
|
||||
oneOf:
|
||||
- type: string
|
||||
- $ref: '#/components/schemas/ImageMedia'
|
||||
- items:
|
||||
oneOf:
|
||||
- type: string
|
||||
- $ref: '#/components/schemas/ImageMedia'
|
||||
type: array
|
||||
$ref: '#/components/schemas/InterleavedContent'
|
||||
role:
|
||||
const: ipython
|
||||
default: ipython
|
||||
|
|
@ -3492,23 +3172,9 @@ components:
|
|||
additionalProperties: false
|
||||
properties:
|
||||
content:
|
||||
oneOf:
|
||||
- type: string
|
||||
- $ref: '#/components/schemas/ImageMedia'
|
||||
- items:
|
||||
oneOf:
|
||||
- type: string
|
||||
- $ref: '#/components/schemas/ImageMedia'
|
||||
type: array
|
||||
$ref: '#/components/schemas/InterleavedContent'
|
||||
context:
|
||||
oneOf:
|
||||
- type: string
|
||||
- $ref: '#/components/schemas/ImageMedia'
|
||||
- items:
|
||||
oneOf:
|
||||
- type: string
|
||||
- $ref: '#/components/schemas/ImageMedia'
|
||||
type: array
|
||||
$ref: '#/components/schemas/InterleavedContent'
|
||||
role:
|
||||
const: user
|
||||
default: user
|
||||
|
|
@ -5297,8 +4963,9 @@ tags:
|
|||
name: GraphMemoryBankParams
|
||||
- description: <SchemaDefinition schemaRef="#/components/schemas/HealthInfo" />
|
||||
name: HealthInfo
|
||||
- description: <SchemaDefinition schemaRef="#/components/schemas/ImageMedia" />
|
||||
name: ImageMedia
|
||||
- description: <SchemaDefinition schemaRef="#/components/schemas/ImageContentItem"
|
||||
/>
|
||||
name: ImageContentItem
|
||||
- name: Inference
|
||||
- description: <SchemaDefinition schemaRef="#/components/schemas/InferenceStep" />
|
||||
name: InferenceStep
|
||||
|
|
@ -5306,6 +4973,12 @@ tags:
|
|||
/>
|
||||
name: InsertDocumentsRequest
|
||||
- name: Inspect
|
||||
- description: <SchemaDefinition schemaRef="#/components/schemas/InterleavedContent"
|
||||
/>
|
||||
name: InterleavedContent
|
||||
- description: <SchemaDefinition schemaRef="#/components/schemas/InterleavedContentItem"
|
||||
/>
|
||||
name: InterleavedContentItem
|
||||
- description: <SchemaDefinition schemaRef="#/components/schemas/Job" />
|
||||
name: Job
|
||||
- description: <SchemaDefinition schemaRef="#/components/schemas/JobCancelRequest"
|
||||
|
|
@ -5364,6 +5037,8 @@ tags:
|
|||
- description: <SchemaDefinition schemaRef="#/components/schemas/PaginatedRowsResult"
|
||||
/>
|
||||
name: PaginatedRowsResult
|
||||
- description: <SchemaDefinition schemaRef="#/components/schemas/ParamType" />
|
||||
name: ParamType
|
||||
- description: <SchemaDefinition schemaRef="#/components/schemas/PhotogenToolDefinition"
|
||||
/>
|
||||
name: PhotogenToolDefinition
|
||||
|
|
@ -5521,6 +5196,9 @@ tags:
|
|||
- description: <SchemaDefinition schemaRef="#/components/schemas/SystemMessage" />
|
||||
name: SystemMessage
|
||||
- name: Telemetry
|
||||
- description: <SchemaDefinition schemaRef="#/components/schemas/TextContentItem"
|
||||
/>
|
||||
name: TextContentItem
|
||||
- description: <SchemaDefinition schemaRef="#/components/schemas/TokenLogProbs" />
|
||||
name: TokenLogProbs
|
||||
- description: <SchemaDefinition schemaRef="#/components/schemas/ToolCall" />
|
||||
|
|
@ -5670,9 +5348,11 @@ x-tagGroups:
|
|||
- GraphMemoryBank
|
||||
- GraphMemoryBankParams
|
||||
- HealthInfo
|
||||
- ImageMedia
|
||||
- ImageContentItem
|
||||
- InferenceStep
|
||||
- InsertDocumentsRequest
|
||||
- InterleavedContent
|
||||
- InterleavedContentItem
|
||||
- Job
|
||||
- JobCancelRequest
|
||||
- JobStatus
|
||||
|
|
@ -5694,6 +5374,7 @@ x-tagGroups:
|
|||
- OptimizerConfig
|
||||
- OptimizerType
|
||||
- PaginatedRowsResult
|
||||
- ParamType
|
||||
- PhotogenToolDefinition
|
||||
- PostTrainingJob
|
||||
- PostTrainingJobArtifactsResponse
|
||||
|
|
@ -5745,6 +5426,7 @@ x-tagGroups:
|
|||
- SyntheticDataGenerateRequest
|
||||
- SyntheticDataGenerationResponse
|
||||
- SystemMessage
|
||||
- TextContentItem
|
||||
- TokenLogProbs
|
||||
- ToolCall
|
||||
- ToolCallDelta
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ The following environment variables can be configured:
|
|||
The following models are available by default:
|
||||
|
||||
- `meta-llama/Llama-3.1-8B-Instruct (llama3.1-8b)`
|
||||
- `meta-llama/Llama-3.1-70B-Instruct (llama3.1-70b)`
|
||||
- `meta-llama/Llama-3.3-70B-Instruct (llama-3.3-70b)`
|
||||
|
||||
|
||||
### Prerequisite: API Keys
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue