add dynamic clients for all APIs (#348)

* add dynamic clients for all APIs

* fix openapi generator

* inference + memory + agents tests now pass with "remote" providers

* Add docstring which fixes openapi generator :/
This commit is contained in:
Ashwin Bharambe 2024-10-31 14:46:25 -07:00 committed by GitHub
parent f04b566c5c
commit 37b330b4ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 350 additions and 84 deletions

View file

@ -21,7 +21,7 @@
"info": {
"title": "[DRAFT] Llama Stack Specification",
"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-10-30 16:17:03.919702"
"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-10-31 14:28:52.128905"
},
"servers": [
{
@ -320,11 +320,18 @@
"post": {
"responses": {
"200": {
"description": "OK",
"description": "A single turn in an interaction with an Agentic System. **OR** streamed agent turn completion response.",
"content": {
"text/event-stream": {
"schema": {
"$ref": "#/components/schemas/AgentTurnResponseStreamChunk"
"oneOf": [
{
"$ref": "#/components/schemas/Turn"
},
{
"$ref": "#/components/schemas/AgentTurnResponseStreamChunk"
}
]
}
}
}
@ -4002,7 +4009,8 @@
"additionalProperties": false,
"required": [
"event"
]
],
"title": "streamed agent turn completion response."
},
"AgentTurnResponseTurnCompletePayload": {
"type": "object",
@ -7054,30 +7062,27 @@
}
],
"tags": [
{
"name": "Inference"
},
{
"name": "Memory"
},
{
"name": "Inspect"
"name": "Inference"
},
{
"name": "PostTraining"
"name": "Eval"
},
{
"name": "MemoryBanks"
},
{
"name": "Models"
},
{
"name": "Scoring"
},
{
"name": "DatasetIO"
},
{
"name": "BatchInference"
},
{
"name": "PostTraining"
},
{
"name": "Agents"
},
@ -7085,19 +7090,22 @@
"name": "Shields"
},
{
"name": "MemoryBanks"
"name": "Telemetry"
},
{
"name": "Datasets"
"name": "Inspect"
},
{
"name": "DatasetIO"
},
{
"name": "SyntheticDataGeneration"
},
{
"name": "Eval"
"name": "Datasets"
},
{
"name": "Telemetry"
"name": "Scoring"
},
{
"name": "ScoringFunctions"
@ -7307,7 +7315,7 @@
},
{
"name": "AgentTurnResponseStreamChunk",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/AgentTurnResponseStreamChunk\" />"
"description": "streamed agent turn completion response.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/AgentTurnResponseStreamChunk\" />"
},
{
"name": "AgentTurnResponseTurnCompletePayload",

View file

@ -190,6 +190,7 @@ components:
$ref: '#/components/schemas/AgentTurnResponseEvent'
required:
- event
title: streamed agent turn completion response.
type: object
AgentTurnResponseTurnCompletePayload:
additionalProperties: false
@ -2997,7 +2998,7 @@ info:
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-10-30 16:17:03.919702"
\ draft and subject to change.\n Generated at 2024-10-31 14:28:52.128905"
title: '[DRAFT] Llama Stack Specification'
version: 0.0.1
jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema
@ -3190,8 +3191,11 @@ paths:
content:
text/event-stream:
schema:
$ref: '#/components/schemas/AgentTurnResponseStreamChunk'
description: OK
oneOf:
- $ref: '#/components/schemas/Turn'
- $ref: '#/components/schemas/AgentTurnResponseStreamChunk'
description: A single turn in an interaction with an Agentic System. **OR**
streamed agent turn completion response.
tags:
- Agents
/agents/turn/get:
@ -4276,21 +4280,21 @@ security:
servers:
- url: http://any-hosted-llama-stack.com
tags:
- name: Inference
- name: Memory
- name: Inspect
- name: PostTraining
- name: Inference
- name: Eval
- name: MemoryBanks
- name: Models
- name: Scoring
- name: DatasetIO
- name: BatchInference
- name: PostTraining
- name: Agents
- name: Shields
- name: MemoryBanks
- name: Datasets
- name: SyntheticDataGeneration
- name: Eval
- name: Telemetry
- name: Inspect
- name: DatasetIO
- name: SyntheticDataGeneration
- name: Datasets
- name: Scoring
- name: ScoringFunctions
- name: Safety
- description: <SchemaDefinition schemaRef="#/components/schemas/BuiltinTool" />
@ -4451,8 +4455,11 @@ tags:
- description: <SchemaDefinition schemaRef="#/components/schemas/AgentTurnResponseStepStartPayload"
/>
name: AgentTurnResponseStepStartPayload
- description: <SchemaDefinition schemaRef="#/components/schemas/AgentTurnResponseStreamChunk"
/>
- description: 'streamed agent turn completion response.
<SchemaDefinition schemaRef="#/components/schemas/AgentTurnResponseStreamChunk"
/>'
name: AgentTurnResponseStreamChunk
- description: <SchemaDefinition schemaRef="#/components/schemas/AgentTurnResponseTurnCompletePayload"
/>