llama3_1 -> llama3

This commit is contained in:
Ashwin Bharambe 2024-08-20 19:00:47 -07:00
parent 75bbe787b6
commit c736e5b576
4 changed files with 69 additions and 24 deletions

View file

@ -9,7 +9,7 @@ from typing import Any, Dict, List, Optional, Protocol
from llama_models.schema_utils import json_schema_type, webmethod from llama_models.schema_utils import json_schema_type, webmethod
from pydantic import BaseModel from pydantic import BaseModel
from llama_models.llama3_1.api.datatypes import * # noqa: F403 from llama_models.llama3.api.datatypes import * # noqa: F403
from .datatypes import * # noqa: F403 from .datatypes import * # noqa: F403

View file

@ -4,7 +4,7 @@
# This source code is licensed under the terms described in the LICENSE file in # This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree. # the root directory of this source tree.
from llama_models.llama3_1.api.datatypes import * # noqa: F403 from llama_models.llama3.api.datatypes import * # noqa: F403
from llama_toolchain.agentic_system.api import * # noqa: F403 from llama_toolchain.agentic_system.api import * # noqa: F403
from llama_toolchain.dataset.api import * # noqa: F403 from llama_toolchain.dataset.api import * # noqa: F403
from llama_toolchain.evaluations.api import * # noqa: F403 from llama_toolchain.evaluations.api import * # noqa: F403

View file

@ -21,7 +21,7 @@
"info": { "info": {
"title": "[DRAFT] Llama Stack Specification", "title": "[DRAFT] Llama Stack Specification",
"version": "0.0.1", "version": "0.0.1",
"description": "This is the specification of the llama stack that provides\n a set of endpoints and their corresponding interfaces that are tailored to\n best leverage Llama Models. The specification is still in draft and subject to change.\n Generated at 2024-08-15 17:30:18.232105" "description": "This is the specification of the llama stack that provides\n a set of endpoints and their corresponding interfaces that are tailored to\n best leverage Llama Models. The specification is still in draft and subject to change.\n Generated at 2024-08-20 19:00:39.110138"
}, },
"servers": [ "servers": [
{ {
@ -2580,6 +2580,9 @@
} }
] ]
} }
},
"tool_prompt_format": {
"$ref": "#/components/schemas/ToolPromptFormat"
} }
}, },
"additionalProperties": false, "additionalProperties": false,
@ -2726,6 +2729,15 @@
"on_violation_action" "on_violation_action"
] ]
}, },
"ToolPromptFormat": {
"type": "string",
"enum": [
"json",
"function_tag"
],
"title": "This Enum refers to the prompt format for calling zero shot tools",
"description": "`json` --\n Refers to the json format for calling tools.\n The json format takes the form like\n {\n \"type\": \"function\",\n \"function\" : {\n \"name\": \"function_name\",\n \"description\": \"function_description\",\n \"parameters\": {...}\n }\n }\n\n`function_tag` --\n This is an example of how you could define\n your own user defined format for making tool calls.\n The function_tag format looks like this,\n <function=function_name>(parameters)</function>\n\nThe detailed prompts for each of these formats are defined in `system_prompt.py`"
},
"AgenticSystemCreateResponse": { "AgenticSystemCreateResponse": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -4768,31 +4780,31 @@
], ],
"tags": [ "tags": [
{ {
"name": "MemoryBanks" "name": "RewardScoring"
},
{
"name": "Observability"
},
{
"name": "Evaluations"
},
{
"name": "Inference"
}, },
{ {
"name": "AgenticSystem" "name": "AgenticSystem"
}, },
{
"name": "SyntheticDataGeneration"
},
{
"name": "Inference"
},
{ {
"name": "Datasets" "name": "Datasets"
}, },
{
"name": "Observability"
},
{ {
"name": "PostTraining" "name": "PostTraining"
}, },
{ {
"name": "SyntheticDataGeneration" "name": "MemoryBanks"
}, },
{ {
"name": "RewardScoring" "name": "Evaluations"
}, },
{ {
"name": "Attachment", "name": "Attachment",
@ -4938,6 +4950,10 @@
"name": "ShieldDefinition", "name": "ShieldDefinition",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/ShieldDefinition\" />" "description": "<SchemaDefinition schemaRef=\"#/components/schemas/ShieldDefinition\" />"
}, },
{
"name": "ToolPromptFormat",
"description": "This Enum refers to the prompt format for calling zero shot tools\n\n`json` --\n Refers to the json format for calling tools.\n The json format takes the form like\n {\n \"type\": \"function\",\n \"function\" : {\n \"name\": \"function_name\",\n \"description\": \"function_description\",\n \"parameters\": {...}\n }\n }\n\n`function_tag` --\n This is an example of how you could define\n your own user defined format for making tool calls.\n The function_tag format looks like this,\n <function=function_name>(parameters)</function>\n\nThe detailed prompts for each of these formats are defined in `system_prompt.py`\n\n<SchemaDefinition schemaRef=\"#/components/schemas/ToolPromptFormat\" />"
},
{ {
"name": "AgenticSystemCreateResponse", "name": "AgenticSystemCreateResponse",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/AgenticSystemCreateResponse\" />" "description": "<SchemaDefinition schemaRef=\"#/components/schemas/AgenticSystemCreateResponse\" />"
@ -5302,6 +5318,7 @@
"ToolDefinition", "ToolDefinition",
"ToolExecutionStep", "ToolExecutionStep",
"ToolParamDefinition", "ToolParamDefinition",
"ToolPromptFormat",
"ToolResponse", "ToolResponse",
"ToolResponseMessage", "ToolResponseMessage",
"TrainEvalDataset", "TrainEvalDataset",

View file

@ -51,6 +51,8 @@ components:
- $ref: '#/components/schemas/Fp8QuantizationConfig' - $ref: '#/components/schemas/Fp8QuantizationConfig'
sampling_params: sampling_params:
$ref: '#/components/schemas/SamplingParams' $ref: '#/components/schemas/SamplingParams'
tool_prompt_format:
$ref: '#/components/schemas/ToolPromptFormat'
required: required:
- instructions - instructions
type: object type: object
@ -1607,6 +1609,20 @@ components:
required: required:
- param_type - param_type
type: object type: object
ToolPromptFormat:
description: "`json` --\n Refers to the json format for calling tools.\n\
\ The json format takes the form like\n {\n \"type\": \"function\"\
,\n \"function\" : {\n \"name\": \"function_name\",\n \
\ \"description\": \"function_description\",\n \"parameters\"\
: {...}\n }\n }\n\n`function_tag` --\n This is an example of\
\ how you could define\n your own user defined format for making tool calls.\n\
\ The function_tag format looks like this,\n <function=function_name>(parameters)</function>\n\
\nThe detailed prompts for each of these formats are defined in `system_prompt.py`"
enum:
- json
- function_tag
title: This Enum refers to the prompt format for calling zero shot tools
type: string
ToolResponse: ToolResponse:
additionalProperties: false additionalProperties: false
properties: properties:
@ -1851,7 +1867,7 @@ info:
description: "This is the specification of the llama stack that provides\n \ description: "This is the specification of the llama stack that provides\n \
\ a set of endpoints and their corresponding interfaces that are tailored\ \ a set of endpoints and their corresponding interfaces that are tailored\
\ to\n best leverage Llama Models. The specification is still in\ \ to\n best leverage Llama Models. The specification is still in\
\ draft and subject to change.\n Generated at 2024-08-15 17:30:18.232105" \ draft and subject to change.\n Generated at 2024-08-20 19:00:39.110138"
title: '[DRAFT] Llama Stack Specification' title: '[DRAFT] Llama Stack Specification'
version: 0.0.1 version: 0.0.1
jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema
@ -2854,15 +2870,15 @@ security:
servers: servers:
- url: http://any-hosted-llama-stack.com - url: http://any-hosted-llama-stack.com
tags: tags:
- name: MemoryBanks
- name: Observability
- name: Evaluations
- name: Inference
- name: AgenticSystem
- name: Datasets
- name: PostTraining
- name: SyntheticDataGeneration
- name: RewardScoring - name: RewardScoring
- name: AgenticSystem
- name: SyntheticDataGeneration
- name: Inference
- name: Datasets
- name: Observability
- name: PostTraining
- name: MemoryBanks
- name: Evaluations
- description: <SchemaDefinition schemaRef="#/components/schemas/Attachment" /> - description: <SchemaDefinition schemaRef="#/components/schemas/Attachment" />
name: Attachment name: Attachment
- description: <SchemaDefinition schemaRef="#/components/schemas/BatchChatCompletionRequest" - description: <SchemaDefinition schemaRef="#/components/schemas/BatchChatCompletionRequest"
@ -2967,6 +2983,17 @@ tags:
- description: <SchemaDefinition schemaRef="#/components/schemas/ShieldDefinition" - description: <SchemaDefinition schemaRef="#/components/schemas/ShieldDefinition"
/> />
name: ShieldDefinition name: ShieldDefinition
- description: "This Enum refers to the prompt format for calling zero shot tools\n\
\n`json` --\n Refers to the json format for calling tools.\n The json format\
\ takes the form like\n {\n \"type\": \"function\",\n \"function\"\
\ : {\n \"name\": \"function_name\",\n \"description\":\
\ \"function_description\",\n \"parameters\": {...}\n }\n \
\ }\n\n`function_tag` --\n This is an example of how you could define\n \
\ your own user defined format for making tool calls.\n The function_tag format\
\ looks like this,\n <function=function_name>(parameters)</function>\n\nThe\
\ detailed prompts for each of these formats are defined in `system_prompt.py`\n\
\n<SchemaDefinition schemaRef=\"#/components/schemas/ToolPromptFormat\" />"
name: ToolPromptFormat
- description: <SchemaDefinition schemaRef="#/components/schemas/AgenticSystemCreateResponse" - description: <SchemaDefinition schemaRef="#/components/schemas/AgenticSystemCreateResponse"
/> />
name: AgenticSystemCreateResponse name: AgenticSystemCreateResponse
@ -3298,6 +3325,7 @@ x-tagGroups:
- ToolDefinition - ToolDefinition
- ToolExecutionStep - ToolExecutionStep
- ToolParamDefinition - ToolParamDefinition
- ToolPromptFormat
- ToolResponse - ToolResponse
- ToolResponseMessage - ToolResponseMessage
- TrainEvalDataset - TrainEvalDataset