mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-17 10:39:48 +00:00
feat(api): add readonly connectors API (#4258)
# What does this PR do? Adds a new API for connectors and MCP registry support along with required types. Does not include any implementation for it <!-- If resolving an issue, uncomment and update the line below --> Closes #4235 and #4061 (partially) ## Test Plan no tests included --------- Signed-off-by: Jaideep Rao <jrao@redhat.com> Co-authored-by: Francisco Javier Arceo <arceofrancisco@gmail.com>
This commit is contained in:
parent
470fe55e87
commit
76e47d811a
12 changed files with 1343 additions and 137 deletions
|
|
@ -3907,6 +3907,161 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/SupervisedFineTuneRequest'
|
$ref: '#/components/schemas/SupervisedFineTuneRequest'
|
||||||
required: true
|
required: true
|
||||||
|
/v1alpha/connectors/{connector_id}:
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: A Connector.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/Connector'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/BadRequest400'
|
||||||
|
description: Bad Request
|
||||||
|
'429':
|
||||||
|
$ref: '#/components/responses/TooManyRequests429'
|
||||||
|
description: Too Many Requests
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/InternalServerError500'
|
||||||
|
description: Internal Server Error
|
||||||
|
default:
|
||||||
|
$ref: '#/components/responses/DefaultError'
|
||||||
|
description: Default Response
|
||||||
|
tags:
|
||||||
|
- Connectors
|
||||||
|
summary: Get Connector
|
||||||
|
description: Get a connector by its ID.
|
||||||
|
operationId: get_connector_v1alpha_connectors__connector_id__get
|
||||||
|
parameters:
|
||||||
|
- name: authorization
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
title: Authorization
|
||||||
|
- name: connector_id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: 'Path parameter: connector_id'
|
||||||
|
/v1alpha/connectors/{connector_id}/tools/{tool_name}:
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: A ToolDef.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ToolDef'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/BadRequest400'
|
||||||
|
description: Bad Request
|
||||||
|
'429':
|
||||||
|
$ref: '#/components/responses/TooManyRequests429'
|
||||||
|
description: Too Many Requests
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/InternalServerError500'
|
||||||
|
description: Internal Server Error
|
||||||
|
default:
|
||||||
|
$ref: '#/components/responses/DefaultError'
|
||||||
|
description: Default Response
|
||||||
|
tags:
|
||||||
|
- Connectors
|
||||||
|
summary: Get Connector Tool
|
||||||
|
description: Get a tool definition by its name from a connector.
|
||||||
|
operationId: get_connector_tool_v1alpha_connectors__connector_id__tools__tool_name__get
|
||||||
|
parameters:
|
||||||
|
- name: authorization
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
title: Authorization
|
||||||
|
- name: connector_id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: 'Path parameter: connector_id'
|
||||||
|
- name: tool_name
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: 'Path parameter: tool_name'
|
||||||
|
/v1alpha/connectors/{connector_id}/tools:
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: A ListToolsResponse.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ListToolsResponse'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/BadRequest400'
|
||||||
|
description: Bad Request
|
||||||
|
'429':
|
||||||
|
$ref: '#/components/responses/TooManyRequests429'
|
||||||
|
description: Too Many Requests
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/InternalServerError500'
|
||||||
|
description: Internal Server Error
|
||||||
|
default:
|
||||||
|
$ref: '#/components/responses/DefaultError'
|
||||||
|
description: Default Response
|
||||||
|
tags:
|
||||||
|
- Connectors
|
||||||
|
summary: List Connector Tools
|
||||||
|
description: List tools available from a connector.
|
||||||
|
operationId: list_connector_tools_v1alpha_connectors__connector_id__tools_get
|
||||||
|
parameters:
|
||||||
|
- name: authorization
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
title: Authorization
|
||||||
|
- name: connector_id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: 'Path parameter: connector_id'
|
||||||
|
/v1alpha/connectors:
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: A ListConnectorsResponse.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ListConnectorsResponse'
|
||||||
|
'400':
|
||||||
|
description: Bad Request
|
||||||
|
$ref: '#/components/responses/BadRequest400'
|
||||||
|
'429':
|
||||||
|
description: Too Many Requests
|
||||||
|
$ref: '#/components/responses/TooManyRequests429'
|
||||||
|
'500':
|
||||||
|
description: Internal Server Error
|
||||||
|
$ref: '#/components/responses/InternalServerError500'
|
||||||
|
default:
|
||||||
|
description: Default Response
|
||||||
|
$ref: '#/components/responses/DefaultError'
|
||||||
|
tags:
|
||||||
|
- Connectors
|
||||||
|
summary: List Connectors
|
||||||
|
description: List all configured connectors.
|
||||||
|
operationId: list_connectors_v1alpha_connectors_get
|
||||||
components:
|
components:
|
||||||
schemas:
|
schemas:
|
||||||
Error:
|
Error:
|
||||||
|
|
@ -11650,6 +11805,66 @@ components:
|
||||||
- chunk_id
|
- chunk_id
|
||||||
title: Chunk
|
title: Chunk
|
||||||
description: A chunk of content that can be inserted into a vector database.
|
description: A chunk of content that can be inserted into a vector database.
|
||||||
|
Connector:
|
||||||
|
properties:
|
||||||
|
identifier:
|
||||||
|
type: string
|
||||||
|
title: Identifier
|
||||||
|
description: Unique identifier for this resource in llama stack
|
||||||
|
provider_resource_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Unique identifier for this resource in the provider
|
||||||
|
provider_id:
|
||||||
|
type: string
|
||||||
|
title: Provider Id
|
||||||
|
description: ID of the provider that owns this resource
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
const: connector
|
||||||
|
title: Type
|
||||||
|
default: connector
|
||||||
|
connector_type:
|
||||||
|
$ref: '#/components/schemas/ConnectorType'
|
||||||
|
default: mcp
|
||||||
|
connector_id:
|
||||||
|
type: string
|
||||||
|
title: Connector Id
|
||||||
|
description: Identifier for the connector
|
||||||
|
url:
|
||||||
|
type: string
|
||||||
|
title: Url
|
||||||
|
description: URL of the connector
|
||||||
|
server_label:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Label of the server
|
||||||
|
server_name:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Name of the server
|
||||||
|
server_description:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Description of the server
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- identifier
|
||||||
|
- provider_id
|
||||||
|
- connector_id
|
||||||
|
- url
|
||||||
|
title: Connector
|
||||||
|
description: A connector resource representing a connector registered in Llama Stack.
|
||||||
|
ConnectorType:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- mcp
|
||||||
|
title: ConnectorType
|
||||||
|
description: Type of connector.
|
||||||
ConversationItemInclude:
|
ConversationItemInclude:
|
||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
|
|
@ -11740,6 +11955,30 @@ components:
|
||||||
- cancelled
|
- cancelled
|
||||||
title: JobStatus
|
title: JobStatus
|
||||||
description: Status of a job execution.
|
description: Status of a job execution.
|
||||||
|
ListConnectorsResponse:
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/Connector'
|
||||||
|
type: array
|
||||||
|
title: Data
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- data
|
||||||
|
title: ListConnectorsResponse
|
||||||
|
description: Response containing a list of connectors.
|
||||||
|
ListToolsResponse:
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/ToolDef'
|
||||||
|
type: array
|
||||||
|
title: Data
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- data
|
||||||
|
title: ListToolsResponse
|
||||||
|
description: Response containing a list of tools.
|
||||||
MCPListToolsTool:
|
MCPListToolsTool:
|
||||||
properties:
|
properties:
|
||||||
input_schema:
|
input_schema:
|
||||||
|
|
@ -12670,6 +12909,63 @@ components:
|
||||||
type: string
|
type: string
|
||||||
title: DialogType
|
title: DialogType
|
||||||
type: object
|
type: object
|
||||||
|
ToolGroupInput:
|
||||||
|
description: Input data for registering a tool group.
|
||||||
|
properties:
|
||||||
|
toolgroup_id:
|
||||||
|
title: Toolgroup Id
|
||||||
|
type: string
|
||||||
|
provider_id:
|
||||||
|
title: Provider Id
|
||||||
|
type: string
|
||||||
|
args:
|
||||||
|
anyOf:
|
||||||
|
- additionalProperties: true
|
||||||
|
type: object
|
||||||
|
- type: 'null'
|
||||||
|
nullable: true
|
||||||
|
mcp_endpoint:
|
||||||
|
anyOf:
|
||||||
|
- $ref: '#/components/schemas/URL'
|
||||||
|
title: URL
|
||||||
|
- type: 'null'
|
||||||
|
nullable: true
|
||||||
|
title: URL
|
||||||
|
required:
|
||||||
|
- toolgroup_id
|
||||||
|
- provider_id
|
||||||
|
title: ToolGroupInput
|
||||||
|
type: object
|
||||||
|
ConnectorInput:
|
||||||
|
description: Input for creating a connector
|
||||||
|
properties:
|
||||||
|
connector_type:
|
||||||
|
$ref: '#/components/schemas/ConnectorType'
|
||||||
|
default: mcp
|
||||||
|
connector_id:
|
||||||
|
description: Identifier for the connector
|
||||||
|
title: Connector Id
|
||||||
|
type: string
|
||||||
|
url:
|
||||||
|
description: URL of the connector
|
||||||
|
title: Url
|
||||||
|
type: string
|
||||||
|
server_label:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Label of the server
|
||||||
|
nullable: true
|
||||||
|
type:
|
||||||
|
const: connector
|
||||||
|
default: connector
|
||||||
|
title: Type
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- connector_id
|
||||||
|
- url
|
||||||
|
title: ConnectorInput
|
||||||
|
type: object
|
||||||
ConversationMessage:
|
ConversationMessage:
|
||||||
description: OpenAI-compatible message item for conversations.
|
description: OpenAI-compatible message item for conversations.
|
||||||
properties:
|
properties:
|
||||||
|
|
@ -12754,33 +13050,6 @@ components:
|
||||||
- items
|
- items
|
||||||
title: ConversationItemCreateRequest
|
title: ConversationItemCreateRequest
|
||||||
type: object
|
type: object
|
||||||
ToolGroupInput:
|
|
||||||
description: Input data for registering a tool group.
|
|
||||||
properties:
|
|
||||||
toolgroup_id:
|
|
||||||
title: Toolgroup Id
|
|
||||||
type: string
|
|
||||||
provider_id:
|
|
||||||
title: Provider Id
|
|
||||||
type: string
|
|
||||||
args:
|
|
||||||
anyOf:
|
|
||||||
- additionalProperties: true
|
|
||||||
type: object
|
|
||||||
- type: 'null'
|
|
||||||
nullable: true
|
|
||||||
mcp_endpoint:
|
|
||||||
anyOf:
|
|
||||||
- $ref: '#/components/schemas/URL'
|
|
||||||
title: URL
|
|
||||||
- type: 'null'
|
|
||||||
nullable: true
|
|
||||||
title: URL
|
|
||||||
required:
|
|
||||||
- toolgroup_id
|
|
||||||
- provider_id
|
|
||||||
title: ToolGroupInput
|
|
||||||
type: object
|
|
||||||
Api:
|
Api:
|
||||||
description: Enumeration of all available APIs in the Llama Stack system.
|
description: Enumeration of all available APIs in the Llama Stack system.
|
||||||
enum:
|
enum:
|
||||||
|
|
@ -12805,6 +13074,7 @@ components:
|
||||||
- files
|
- files
|
||||||
- prompts
|
- prompts
|
||||||
- conversations
|
- conversations
|
||||||
|
- connectors
|
||||||
- inspect
|
- inspect
|
||||||
title: Api
|
title: Api
|
||||||
type: string
|
type: string
|
||||||
|
|
|
||||||
169
docs/static/deprecated-llama-stack-spec.yaml
vendored
169
docs/static/deprecated-llama-stack-spec.yaml
vendored
|
|
@ -8634,6 +8634,66 @@ components:
|
||||||
- chunk_id
|
- chunk_id
|
||||||
title: Chunk
|
title: Chunk
|
||||||
description: A chunk of content that can be inserted into a vector database.
|
description: A chunk of content that can be inserted into a vector database.
|
||||||
|
Connector:
|
||||||
|
properties:
|
||||||
|
identifier:
|
||||||
|
type: string
|
||||||
|
title: Identifier
|
||||||
|
description: Unique identifier for this resource in llama stack
|
||||||
|
provider_resource_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Unique identifier for this resource in the provider
|
||||||
|
provider_id:
|
||||||
|
type: string
|
||||||
|
title: Provider Id
|
||||||
|
description: ID of the provider that owns this resource
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
const: connector
|
||||||
|
title: Type
|
||||||
|
default: connector
|
||||||
|
connector_type:
|
||||||
|
$ref: '#/components/schemas/ConnectorType'
|
||||||
|
default: mcp
|
||||||
|
connector_id:
|
||||||
|
type: string
|
||||||
|
title: Connector Id
|
||||||
|
description: Identifier for the connector
|
||||||
|
url:
|
||||||
|
type: string
|
||||||
|
title: Url
|
||||||
|
description: URL of the connector
|
||||||
|
server_label:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Label of the server
|
||||||
|
server_name:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Name of the server
|
||||||
|
server_description:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Description of the server
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- identifier
|
||||||
|
- provider_id
|
||||||
|
- connector_id
|
||||||
|
- url
|
||||||
|
title: Connector
|
||||||
|
description: A connector resource representing a connector registered in Llama Stack.
|
||||||
|
ConnectorType:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- mcp
|
||||||
|
title: ConnectorType
|
||||||
|
description: Type of connector.
|
||||||
ConversationItemInclude:
|
ConversationItemInclude:
|
||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
|
|
@ -8724,6 +8784,30 @@ components:
|
||||||
- cancelled
|
- cancelled
|
||||||
title: JobStatus
|
title: JobStatus
|
||||||
description: Status of a job execution.
|
description: Status of a job execution.
|
||||||
|
ListConnectorsResponse:
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/Connector'
|
||||||
|
type: array
|
||||||
|
title: Data
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- data
|
||||||
|
title: ListConnectorsResponse
|
||||||
|
description: Response containing a list of connectors.
|
||||||
|
ListToolsResponse:
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/ToolDef'
|
||||||
|
type: array
|
||||||
|
title: Data
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- data
|
||||||
|
title: ListToolsResponse
|
||||||
|
description: Response containing a list of tools.
|
||||||
MCPListToolsTool:
|
MCPListToolsTool:
|
||||||
properties:
|
properties:
|
||||||
input_schema:
|
input_schema:
|
||||||
|
|
@ -9654,6 +9738,63 @@ components:
|
||||||
type: string
|
type: string
|
||||||
title: DialogType
|
title: DialogType
|
||||||
type: object
|
type: object
|
||||||
|
ToolGroupInput:
|
||||||
|
description: Input data for registering a tool group.
|
||||||
|
properties:
|
||||||
|
toolgroup_id:
|
||||||
|
title: Toolgroup Id
|
||||||
|
type: string
|
||||||
|
provider_id:
|
||||||
|
title: Provider Id
|
||||||
|
type: string
|
||||||
|
args:
|
||||||
|
anyOf:
|
||||||
|
- additionalProperties: true
|
||||||
|
type: object
|
||||||
|
- type: 'null'
|
||||||
|
nullable: true
|
||||||
|
mcp_endpoint:
|
||||||
|
anyOf:
|
||||||
|
- $ref: '#/components/schemas/URL'
|
||||||
|
title: URL
|
||||||
|
- type: 'null'
|
||||||
|
nullable: true
|
||||||
|
title: URL
|
||||||
|
required:
|
||||||
|
- toolgroup_id
|
||||||
|
- provider_id
|
||||||
|
title: ToolGroupInput
|
||||||
|
type: object
|
||||||
|
ConnectorInput:
|
||||||
|
description: Input for creating a connector
|
||||||
|
properties:
|
||||||
|
connector_type:
|
||||||
|
$ref: '#/components/schemas/ConnectorType'
|
||||||
|
default: mcp
|
||||||
|
connector_id:
|
||||||
|
description: Identifier for the connector
|
||||||
|
title: Connector Id
|
||||||
|
type: string
|
||||||
|
url:
|
||||||
|
description: URL of the connector
|
||||||
|
title: Url
|
||||||
|
type: string
|
||||||
|
server_label:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Label of the server
|
||||||
|
nullable: true
|
||||||
|
type:
|
||||||
|
const: connector
|
||||||
|
default: connector
|
||||||
|
title: Type
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- connector_id
|
||||||
|
- url
|
||||||
|
title: ConnectorInput
|
||||||
|
type: object
|
||||||
ConversationMessage:
|
ConversationMessage:
|
||||||
description: OpenAI-compatible message item for conversations.
|
description: OpenAI-compatible message item for conversations.
|
||||||
properties:
|
properties:
|
||||||
|
|
@ -9738,33 +9879,6 @@ components:
|
||||||
- items
|
- items
|
||||||
title: ConversationItemCreateRequest
|
title: ConversationItemCreateRequest
|
||||||
type: object
|
type: object
|
||||||
ToolGroupInput:
|
|
||||||
description: Input data for registering a tool group.
|
|
||||||
properties:
|
|
||||||
toolgroup_id:
|
|
||||||
title: Toolgroup Id
|
|
||||||
type: string
|
|
||||||
provider_id:
|
|
||||||
title: Provider Id
|
|
||||||
type: string
|
|
||||||
args:
|
|
||||||
anyOf:
|
|
||||||
- additionalProperties: true
|
|
||||||
type: object
|
|
||||||
- type: 'null'
|
|
||||||
nullable: true
|
|
||||||
mcp_endpoint:
|
|
||||||
anyOf:
|
|
||||||
- $ref: '#/components/schemas/URL'
|
|
||||||
title: URL
|
|
||||||
- type: 'null'
|
|
||||||
nullable: true
|
|
||||||
title: URL
|
|
||||||
required:
|
|
||||||
- toolgroup_id
|
|
||||||
- provider_id
|
|
||||||
title: ToolGroupInput
|
|
||||||
type: object
|
|
||||||
Api:
|
Api:
|
||||||
description: Enumeration of all available APIs in the Llama Stack system.
|
description: Enumeration of all available APIs in the Llama Stack system.
|
||||||
enum:
|
enum:
|
||||||
|
|
@ -9789,6 +9903,7 @@ components:
|
||||||
- files
|
- files
|
||||||
- prompts
|
- prompts
|
||||||
- conversations
|
- conversations
|
||||||
|
- connectors
|
||||||
- inspect
|
- inspect
|
||||||
title: Api
|
title: Api
|
||||||
type: string
|
type: string
|
||||||
|
|
|
||||||
324
docs/static/experimental-llama-stack-spec.yaml
vendored
324
docs/static/experimental-llama-stack-spec.yaml
vendored
|
|
@ -632,6 +632,161 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/SupervisedFineTuneRequest'
|
$ref: '#/components/schemas/SupervisedFineTuneRequest'
|
||||||
required: true
|
required: true
|
||||||
|
/v1alpha/connectors/{connector_id}:
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: A Connector.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/Connector'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/BadRequest400'
|
||||||
|
description: Bad Request
|
||||||
|
'429':
|
||||||
|
$ref: '#/components/responses/TooManyRequests429'
|
||||||
|
description: Too Many Requests
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/InternalServerError500'
|
||||||
|
description: Internal Server Error
|
||||||
|
default:
|
||||||
|
$ref: '#/components/responses/DefaultError'
|
||||||
|
description: Default Response
|
||||||
|
tags:
|
||||||
|
- Connectors
|
||||||
|
summary: Get Connector
|
||||||
|
description: Get a connector by its ID.
|
||||||
|
operationId: get_connector_v1alpha_connectors__connector_id__get
|
||||||
|
parameters:
|
||||||
|
- name: authorization
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
title: Authorization
|
||||||
|
- name: connector_id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: 'Path parameter: connector_id'
|
||||||
|
/v1alpha/connectors/{connector_id}/tools/{tool_name}:
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: A ToolDef.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ToolDef'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/BadRequest400'
|
||||||
|
description: Bad Request
|
||||||
|
'429':
|
||||||
|
$ref: '#/components/responses/TooManyRequests429'
|
||||||
|
description: Too Many Requests
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/InternalServerError500'
|
||||||
|
description: Internal Server Error
|
||||||
|
default:
|
||||||
|
$ref: '#/components/responses/DefaultError'
|
||||||
|
description: Default Response
|
||||||
|
tags:
|
||||||
|
- Connectors
|
||||||
|
summary: Get Connector Tool
|
||||||
|
description: Get a tool definition by its name from a connector.
|
||||||
|
operationId: get_connector_tool_v1alpha_connectors__connector_id__tools__tool_name__get
|
||||||
|
parameters:
|
||||||
|
- name: authorization
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
title: Authorization
|
||||||
|
- name: connector_id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: 'Path parameter: connector_id'
|
||||||
|
- name: tool_name
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: 'Path parameter: tool_name'
|
||||||
|
/v1alpha/connectors/{connector_id}/tools:
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: A ListToolsResponse.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ListToolsResponse'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/BadRequest400'
|
||||||
|
description: Bad Request
|
||||||
|
'429':
|
||||||
|
$ref: '#/components/responses/TooManyRequests429'
|
||||||
|
description: Too Many Requests
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/InternalServerError500'
|
||||||
|
description: Internal Server Error
|
||||||
|
default:
|
||||||
|
$ref: '#/components/responses/DefaultError'
|
||||||
|
description: Default Response
|
||||||
|
tags:
|
||||||
|
- Connectors
|
||||||
|
summary: List Connector Tools
|
||||||
|
description: List tools available from a connector.
|
||||||
|
operationId: list_connector_tools_v1alpha_connectors__connector_id__tools_get
|
||||||
|
parameters:
|
||||||
|
- name: authorization
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
title: Authorization
|
||||||
|
- name: connector_id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: 'Path parameter: connector_id'
|
||||||
|
/v1alpha/connectors:
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: A ListConnectorsResponse.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ListConnectorsResponse'
|
||||||
|
'400':
|
||||||
|
description: Bad Request
|
||||||
|
$ref: '#/components/responses/BadRequest400'
|
||||||
|
'429':
|
||||||
|
description: Too Many Requests
|
||||||
|
$ref: '#/components/responses/TooManyRequests429'
|
||||||
|
'500':
|
||||||
|
description: Internal Server Error
|
||||||
|
$ref: '#/components/responses/InternalServerError500'
|
||||||
|
default:
|
||||||
|
description: Default Response
|
||||||
|
$ref: '#/components/responses/DefaultError'
|
||||||
|
tags:
|
||||||
|
- Connectors
|
||||||
|
summary: List Connectors
|
||||||
|
description: List all configured connectors.
|
||||||
|
operationId: list_connectors_v1alpha_connectors_get
|
||||||
components:
|
components:
|
||||||
schemas:
|
schemas:
|
||||||
Error:
|
Error:
|
||||||
|
|
@ -7539,6 +7694,66 @@ components:
|
||||||
- chunk_id
|
- chunk_id
|
||||||
title: Chunk
|
title: Chunk
|
||||||
description: A chunk of content that can be inserted into a vector database.
|
description: A chunk of content that can be inserted into a vector database.
|
||||||
|
Connector:
|
||||||
|
properties:
|
||||||
|
identifier:
|
||||||
|
type: string
|
||||||
|
title: Identifier
|
||||||
|
description: Unique identifier for this resource in llama stack
|
||||||
|
provider_resource_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Unique identifier for this resource in the provider
|
||||||
|
provider_id:
|
||||||
|
type: string
|
||||||
|
title: Provider Id
|
||||||
|
description: ID of the provider that owns this resource
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
const: connector
|
||||||
|
title: Type
|
||||||
|
default: connector
|
||||||
|
connector_type:
|
||||||
|
$ref: '#/components/schemas/ConnectorType'
|
||||||
|
default: mcp
|
||||||
|
connector_id:
|
||||||
|
type: string
|
||||||
|
title: Connector Id
|
||||||
|
description: Identifier for the connector
|
||||||
|
url:
|
||||||
|
type: string
|
||||||
|
title: Url
|
||||||
|
description: URL of the connector
|
||||||
|
server_label:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Label of the server
|
||||||
|
server_name:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Name of the server
|
||||||
|
server_description:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Description of the server
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- identifier
|
||||||
|
- provider_id
|
||||||
|
- connector_id
|
||||||
|
- url
|
||||||
|
title: Connector
|
||||||
|
description: A connector resource representing a connector registered in Llama Stack.
|
||||||
|
ConnectorType:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- mcp
|
||||||
|
title: ConnectorType
|
||||||
|
description: Type of connector.
|
||||||
DatasetPurpose:
|
DatasetPurpose:
|
||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
|
|
@ -7617,6 +7832,30 @@ components:
|
||||||
- cancelled
|
- cancelled
|
||||||
title: JobStatus
|
title: JobStatus
|
||||||
description: Status of a job execution.
|
description: Status of a job execution.
|
||||||
|
ListConnectorsResponse:
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/Connector'
|
||||||
|
type: array
|
||||||
|
title: Data
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- data
|
||||||
|
title: ListConnectorsResponse
|
||||||
|
description: Response containing a list of connectors.
|
||||||
|
ListToolsResponse:
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/ToolDef'
|
||||||
|
type: array
|
||||||
|
title: Data
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- data
|
||||||
|
title: ListToolsResponse
|
||||||
|
description: Response containing a list of tools.
|
||||||
MCPListToolsTool:
|
MCPListToolsTool:
|
||||||
properties:
|
properties:
|
||||||
input_schema:
|
input_schema:
|
||||||
|
|
@ -8478,6 +8717,63 @@ components:
|
||||||
type: string
|
type: string
|
||||||
title: DialogType
|
title: DialogType
|
||||||
type: object
|
type: object
|
||||||
|
ToolGroupInput:
|
||||||
|
description: Input data for registering a tool group.
|
||||||
|
properties:
|
||||||
|
toolgroup_id:
|
||||||
|
title: Toolgroup Id
|
||||||
|
type: string
|
||||||
|
provider_id:
|
||||||
|
title: Provider Id
|
||||||
|
type: string
|
||||||
|
args:
|
||||||
|
anyOf:
|
||||||
|
- additionalProperties: true
|
||||||
|
type: object
|
||||||
|
- type: 'null'
|
||||||
|
nullable: true
|
||||||
|
mcp_endpoint:
|
||||||
|
anyOf:
|
||||||
|
- $ref: '#/components/schemas/URL'
|
||||||
|
title: URL
|
||||||
|
- type: 'null'
|
||||||
|
nullable: true
|
||||||
|
title: URL
|
||||||
|
required:
|
||||||
|
- toolgroup_id
|
||||||
|
- provider_id
|
||||||
|
title: ToolGroupInput
|
||||||
|
type: object
|
||||||
|
ConnectorInput:
|
||||||
|
description: Input for creating a connector
|
||||||
|
properties:
|
||||||
|
connector_type:
|
||||||
|
$ref: '#/components/schemas/ConnectorType'
|
||||||
|
default: mcp
|
||||||
|
connector_id:
|
||||||
|
description: Identifier for the connector
|
||||||
|
title: Connector Id
|
||||||
|
type: string
|
||||||
|
url:
|
||||||
|
description: URL of the connector
|
||||||
|
title: Url
|
||||||
|
type: string
|
||||||
|
server_label:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Label of the server
|
||||||
|
nullable: true
|
||||||
|
type:
|
||||||
|
const: connector
|
||||||
|
default: connector
|
||||||
|
title: Type
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- connector_id
|
||||||
|
- url
|
||||||
|
title: ConnectorInput
|
||||||
|
type: object
|
||||||
ConversationMessage:
|
ConversationMessage:
|
||||||
description: OpenAI-compatible message item for conversations.
|
description: OpenAI-compatible message item for conversations.
|
||||||
properties:
|
properties:
|
||||||
|
|
@ -8562,33 +8858,6 @@ components:
|
||||||
- items
|
- items
|
||||||
title: ConversationItemCreateRequest
|
title: ConversationItemCreateRequest
|
||||||
type: object
|
type: object
|
||||||
ToolGroupInput:
|
|
||||||
description: Input data for registering a tool group.
|
|
||||||
properties:
|
|
||||||
toolgroup_id:
|
|
||||||
title: Toolgroup Id
|
|
||||||
type: string
|
|
||||||
provider_id:
|
|
||||||
title: Provider Id
|
|
||||||
type: string
|
|
||||||
args:
|
|
||||||
anyOf:
|
|
||||||
- additionalProperties: true
|
|
||||||
type: object
|
|
||||||
- type: 'null'
|
|
||||||
nullable: true
|
|
||||||
mcp_endpoint:
|
|
||||||
anyOf:
|
|
||||||
- $ref: '#/components/schemas/URL'
|
|
||||||
title: URL
|
|
||||||
- type: 'null'
|
|
||||||
nullable: true
|
|
||||||
title: URL
|
|
||||||
required:
|
|
||||||
- toolgroup_id
|
|
||||||
- provider_id
|
|
||||||
title: ToolGroupInput
|
|
||||||
type: object
|
|
||||||
Api:
|
Api:
|
||||||
description: Enumeration of all available APIs in the Llama Stack system.
|
description: Enumeration of all available APIs in the Llama Stack system.
|
||||||
enum:
|
enum:
|
||||||
|
|
@ -8613,6 +8882,7 @@ components:
|
||||||
- files
|
- files
|
||||||
- prompts
|
- prompts
|
||||||
- conversations
|
- conversations
|
||||||
|
- connectors
|
||||||
- inspect
|
- inspect
|
||||||
title: Api
|
title: Api
|
||||||
type: string
|
type: string
|
||||||
|
|
|
||||||
169
docs/static/llama-stack-spec.yaml
vendored
169
docs/static/llama-stack-spec.yaml
vendored
|
|
@ -10114,6 +10114,66 @@ components:
|
||||||
- chunk_id
|
- chunk_id
|
||||||
title: Chunk
|
title: Chunk
|
||||||
description: A chunk of content that can be inserted into a vector database.
|
description: A chunk of content that can be inserted into a vector database.
|
||||||
|
Connector:
|
||||||
|
properties:
|
||||||
|
identifier:
|
||||||
|
type: string
|
||||||
|
title: Identifier
|
||||||
|
description: Unique identifier for this resource in llama stack
|
||||||
|
provider_resource_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Unique identifier for this resource in the provider
|
||||||
|
provider_id:
|
||||||
|
type: string
|
||||||
|
title: Provider Id
|
||||||
|
description: ID of the provider that owns this resource
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
const: connector
|
||||||
|
title: Type
|
||||||
|
default: connector
|
||||||
|
connector_type:
|
||||||
|
$ref: '#/components/schemas/ConnectorType'
|
||||||
|
default: mcp
|
||||||
|
connector_id:
|
||||||
|
type: string
|
||||||
|
title: Connector Id
|
||||||
|
description: Identifier for the connector
|
||||||
|
url:
|
||||||
|
type: string
|
||||||
|
title: Url
|
||||||
|
description: URL of the connector
|
||||||
|
server_label:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Label of the server
|
||||||
|
server_name:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Name of the server
|
||||||
|
server_description:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Description of the server
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- identifier
|
||||||
|
- provider_id
|
||||||
|
- connector_id
|
||||||
|
- url
|
||||||
|
title: Connector
|
||||||
|
description: A connector resource representing a connector registered in Llama Stack.
|
||||||
|
ConnectorType:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- mcp
|
||||||
|
title: ConnectorType
|
||||||
|
description: Type of connector.
|
||||||
ConversationItemInclude:
|
ConversationItemInclude:
|
||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
|
|
@ -10204,6 +10264,30 @@ components:
|
||||||
- cancelled
|
- cancelled
|
||||||
title: JobStatus
|
title: JobStatus
|
||||||
description: Status of a job execution.
|
description: Status of a job execution.
|
||||||
|
ListConnectorsResponse:
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/Connector'
|
||||||
|
type: array
|
||||||
|
title: Data
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- data
|
||||||
|
title: ListConnectorsResponse
|
||||||
|
description: Response containing a list of connectors.
|
||||||
|
ListToolsResponse:
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/ToolDef'
|
||||||
|
type: array
|
||||||
|
title: Data
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- data
|
||||||
|
title: ListToolsResponse
|
||||||
|
description: Response containing a list of tools.
|
||||||
MCPListToolsTool:
|
MCPListToolsTool:
|
||||||
properties:
|
properties:
|
||||||
input_schema:
|
input_schema:
|
||||||
|
|
@ -11134,6 +11218,63 @@ components:
|
||||||
type: string
|
type: string
|
||||||
title: DialogType
|
title: DialogType
|
||||||
type: object
|
type: object
|
||||||
|
ToolGroupInput:
|
||||||
|
description: Input data for registering a tool group.
|
||||||
|
properties:
|
||||||
|
toolgroup_id:
|
||||||
|
title: Toolgroup Id
|
||||||
|
type: string
|
||||||
|
provider_id:
|
||||||
|
title: Provider Id
|
||||||
|
type: string
|
||||||
|
args:
|
||||||
|
anyOf:
|
||||||
|
- additionalProperties: true
|
||||||
|
type: object
|
||||||
|
- type: 'null'
|
||||||
|
nullable: true
|
||||||
|
mcp_endpoint:
|
||||||
|
anyOf:
|
||||||
|
- $ref: '#/components/schemas/URL'
|
||||||
|
title: URL
|
||||||
|
- type: 'null'
|
||||||
|
nullable: true
|
||||||
|
title: URL
|
||||||
|
required:
|
||||||
|
- toolgroup_id
|
||||||
|
- provider_id
|
||||||
|
title: ToolGroupInput
|
||||||
|
type: object
|
||||||
|
ConnectorInput:
|
||||||
|
description: Input for creating a connector
|
||||||
|
properties:
|
||||||
|
connector_type:
|
||||||
|
$ref: '#/components/schemas/ConnectorType'
|
||||||
|
default: mcp
|
||||||
|
connector_id:
|
||||||
|
description: Identifier for the connector
|
||||||
|
title: Connector Id
|
||||||
|
type: string
|
||||||
|
url:
|
||||||
|
description: URL of the connector
|
||||||
|
title: Url
|
||||||
|
type: string
|
||||||
|
server_label:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Label of the server
|
||||||
|
nullable: true
|
||||||
|
type:
|
||||||
|
const: connector
|
||||||
|
default: connector
|
||||||
|
title: Type
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- connector_id
|
||||||
|
- url
|
||||||
|
title: ConnectorInput
|
||||||
|
type: object
|
||||||
ConversationMessage:
|
ConversationMessage:
|
||||||
description: OpenAI-compatible message item for conversations.
|
description: OpenAI-compatible message item for conversations.
|
||||||
properties:
|
properties:
|
||||||
|
|
@ -11218,33 +11359,6 @@ components:
|
||||||
- items
|
- items
|
||||||
title: ConversationItemCreateRequest
|
title: ConversationItemCreateRequest
|
||||||
type: object
|
type: object
|
||||||
ToolGroupInput:
|
|
||||||
description: Input data for registering a tool group.
|
|
||||||
properties:
|
|
||||||
toolgroup_id:
|
|
||||||
title: Toolgroup Id
|
|
||||||
type: string
|
|
||||||
provider_id:
|
|
||||||
title: Provider Id
|
|
||||||
type: string
|
|
||||||
args:
|
|
||||||
anyOf:
|
|
||||||
- additionalProperties: true
|
|
||||||
type: object
|
|
||||||
- type: 'null'
|
|
||||||
nullable: true
|
|
||||||
mcp_endpoint:
|
|
||||||
anyOf:
|
|
||||||
- $ref: '#/components/schemas/URL'
|
|
||||||
title: URL
|
|
||||||
- type: 'null'
|
|
||||||
nullable: true
|
|
||||||
title: URL
|
|
||||||
required:
|
|
||||||
- toolgroup_id
|
|
||||||
- provider_id
|
|
||||||
title: ToolGroupInput
|
|
||||||
type: object
|
|
||||||
Api:
|
Api:
|
||||||
description: Enumeration of all available APIs in the Llama Stack system.
|
description: Enumeration of all available APIs in the Llama Stack system.
|
||||||
enum:
|
enum:
|
||||||
|
|
@ -11269,6 +11383,7 @@ components:
|
||||||
- files
|
- files
|
||||||
- prompts
|
- prompts
|
||||||
- conversations
|
- conversations
|
||||||
|
- connectors
|
||||||
- inspect
|
- inspect
|
||||||
title: Api
|
title: Api
|
||||||
type: string
|
type: string
|
||||||
|
|
|
||||||
324
docs/static/stainless-llama-stack-spec.yaml
vendored
324
docs/static/stainless-llama-stack-spec.yaml
vendored
|
|
@ -3907,6 +3907,161 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/SupervisedFineTuneRequest'
|
$ref: '#/components/schemas/SupervisedFineTuneRequest'
|
||||||
required: true
|
required: true
|
||||||
|
/v1alpha/connectors/{connector_id}:
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: A Connector.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/Connector'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/BadRequest400'
|
||||||
|
description: Bad Request
|
||||||
|
'429':
|
||||||
|
$ref: '#/components/responses/TooManyRequests429'
|
||||||
|
description: Too Many Requests
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/InternalServerError500'
|
||||||
|
description: Internal Server Error
|
||||||
|
default:
|
||||||
|
$ref: '#/components/responses/DefaultError'
|
||||||
|
description: Default Response
|
||||||
|
tags:
|
||||||
|
- Connectors
|
||||||
|
summary: Get Connector
|
||||||
|
description: Get a connector by its ID.
|
||||||
|
operationId: get_connector_v1alpha_connectors__connector_id__get
|
||||||
|
parameters:
|
||||||
|
- name: authorization
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
title: Authorization
|
||||||
|
- name: connector_id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: 'Path parameter: connector_id'
|
||||||
|
/v1alpha/connectors/{connector_id}/tools/{tool_name}:
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: A ToolDef.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ToolDef'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/BadRequest400'
|
||||||
|
description: Bad Request
|
||||||
|
'429':
|
||||||
|
$ref: '#/components/responses/TooManyRequests429'
|
||||||
|
description: Too Many Requests
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/InternalServerError500'
|
||||||
|
description: Internal Server Error
|
||||||
|
default:
|
||||||
|
$ref: '#/components/responses/DefaultError'
|
||||||
|
description: Default Response
|
||||||
|
tags:
|
||||||
|
- Connectors
|
||||||
|
summary: Get Connector Tool
|
||||||
|
description: Get a tool definition by its name from a connector.
|
||||||
|
operationId: get_connector_tool_v1alpha_connectors__connector_id__tools__tool_name__get
|
||||||
|
parameters:
|
||||||
|
- name: authorization
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
title: Authorization
|
||||||
|
- name: connector_id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: 'Path parameter: connector_id'
|
||||||
|
- name: tool_name
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: 'Path parameter: tool_name'
|
||||||
|
/v1alpha/connectors/{connector_id}/tools:
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: A ListToolsResponse.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ListToolsResponse'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/BadRequest400'
|
||||||
|
description: Bad Request
|
||||||
|
'429':
|
||||||
|
$ref: '#/components/responses/TooManyRequests429'
|
||||||
|
description: Too Many Requests
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/InternalServerError500'
|
||||||
|
description: Internal Server Error
|
||||||
|
default:
|
||||||
|
$ref: '#/components/responses/DefaultError'
|
||||||
|
description: Default Response
|
||||||
|
tags:
|
||||||
|
- Connectors
|
||||||
|
summary: List Connector Tools
|
||||||
|
description: List tools available from a connector.
|
||||||
|
operationId: list_connector_tools_v1alpha_connectors__connector_id__tools_get
|
||||||
|
parameters:
|
||||||
|
- name: authorization
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
title: Authorization
|
||||||
|
- name: connector_id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: 'Path parameter: connector_id'
|
||||||
|
/v1alpha/connectors:
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: A ListConnectorsResponse.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ListConnectorsResponse'
|
||||||
|
'400':
|
||||||
|
description: Bad Request
|
||||||
|
$ref: '#/components/responses/BadRequest400'
|
||||||
|
'429':
|
||||||
|
description: Too Many Requests
|
||||||
|
$ref: '#/components/responses/TooManyRequests429'
|
||||||
|
'500':
|
||||||
|
description: Internal Server Error
|
||||||
|
$ref: '#/components/responses/InternalServerError500'
|
||||||
|
default:
|
||||||
|
description: Default Response
|
||||||
|
$ref: '#/components/responses/DefaultError'
|
||||||
|
tags:
|
||||||
|
- Connectors
|
||||||
|
summary: List Connectors
|
||||||
|
description: List all configured connectors.
|
||||||
|
operationId: list_connectors_v1alpha_connectors_get
|
||||||
components:
|
components:
|
||||||
schemas:
|
schemas:
|
||||||
Error:
|
Error:
|
||||||
|
|
@ -11650,6 +11805,66 @@ components:
|
||||||
- chunk_id
|
- chunk_id
|
||||||
title: Chunk
|
title: Chunk
|
||||||
description: A chunk of content that can be inserted into a vector database.
|
description: A chunk of content that can be inserted into a vector database.
|
||||||
|
Connector:
|
||||||
|
properties:
|
||||||
|
identifier:
|
||||||
|
type: string
|
||||||
|
title: Identifier
|
||||||
|
description: Unique identifier for this resource in llama stack
|
||||||
|
provider_resource_id:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Unique identifier for this resource in the provider
|
||||||
|
provider_id:
|
||||||
|
type: string
|
||||||
|
title: Provider Id
|
||||||
|
description: ID of the provider that owns this resource
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
const: connector
|
||||||
|
title: Type
|
||||||
|
default: connector
|
||||||
|
connector_type:
|
||||||
|
$ref: '#/components/schemas/ConnectorType'
|
||||||
|
default: mcp
|
||||||
|
connector_id:
|
||||||
|
type: string
|
||||||
|
title: Connector Id
|
||||||
|
description: Identifier for the connector
|
||||||
|
url:
|
||||||
|
type: string
|
||||||
|
title: Url
|
||||||
|
description: URL of the connector
|
||||||
|
server_label:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Label of the server
|
||||||
|
server_name:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Name of the server
|
||||||
|
server_description:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Description of the server
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- identifier
|
||||||
|
- provider_id
|
||||||
|
- connector_id
|
||||||
|
- url
|
||||||
|
title: Connector
|
||||||
|
description: A connector resource representing a connector registered in Llama Stack.
|
||||||
|
ConnectorType:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- mcp
|
||||||
|
title: ConnectorType
|
||||||
|
description: Type of connector.
|
||||||
ConversationItemInclude:
|
ConversationItemInclude:
|
||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
|
|
@ -11740,6 +11955,30 @@ components:
|
||||||
- cancelled
|
- cancelled
|
||||||
title: JobStatus
|
title: JobStatus
|
||||||
description: Status of a job execution.
|
description: Status of a job execution.
|
||||||
|
ListConnectorsResponse:
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/Connector'
|
||||||
|
type: array
|
||||||
|
title: Data
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- data
|
||||||
|
title: ListConnectorsResponse
|
||||||
|
description: Response containing a list of connectors.
|
||||||
|
ListToolsResponse:
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/ToolDef'
|
||||||
|
type: array
|
||||||
|
title: Data
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- data
|
||||||
|
title: ListToolsResponse
|
||||||
|
description: Response containing a list of tools.
|
||||||
MCPListToolsTool:
|
MCPListToolsTool:
|
||||||
properties:
|
properties:
|
||||||
input_schema:
|
input_schema:
|
||||||
|
|
@ -12670,6 +12909,63 @@ components:
|
||||||
type: string
|
type: string
|
||||||
title: DialogType
|
title: DialogType
|
||||||
type: object
|
type: object
|
||||||
|
ToolGroupInput:
|
||||||
|
description: Input data for registering a tool group.
|
||||||
|
properties:
|
||||||
|
toolgroup_id:
|
||||||
|
title: Toolgroup Id
|
||||||
|
type: string
|
||||||
|
provider_id:
|
||||||
|
title: Provider Id
|
||||||
|
type: string
|
||||||
|
args:
|
||||||
|
anyOf:
|
||||||
|
- additionalProperties: true
|
||||||
|
type: object
|
||||||
|
- type: 'null'
|
||||||
|
nullable: true
|
||||||
|
mcp_endpoint:
|
||||||
|
anyOf:
|
||||||
|
- $ref: '#/components/schemas/URL'
|
||||||
|
title: URL
|
||||||
|
- type: 'null'
|
||||||
|
nullable: true
|
||||||
|
title: URL
|
||||||
|
required:
|
||||||
|
- toolgroup_id
|
||||||
|
- provider_id
|
||||||
|
title: ToolGroupInput
|
||||||
|
type: object
|
||||||
|
ConnectorInput:
|
||||||
|
description: Input for creating a connector
|
||||||
|
properties:
|
||||||
|
connector_type:
|
||||||
|
$ref: '#/components/schemas/ConnectorType'
|
||||||
|
default: mcp
|
||||||
|
connector_id:
|
||||||
|
description: Identifier for the connector
|
||||||
|
title: Connector Id
|
||||||
|
type: string
|
||||||
|
url:
|
||||||
|
description: URL of the connector
|
||||||
|
title: Url
|
||||||
|
type: string
|
||||||
|
server_label:
|
||||||
|
anyOf:
|
||||||
|
- type: string
|
||||||
|
- type: 'null'
|
||||||
|
description: Label of the server
|
||||||
|
nullable: true
|
||||||
|
type:
|
||||||
|
const: connector
|
||||||
|
default: connector
|
||||||
|
title: Type
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- connector_id
|
||||||
|
- url
|
||||||
|
title: ConnectorInput
|
||||||
|
type: object
|
||||||
ConversationMessage:
|
ConversationMessage:
|
||||||
description: OpenAI-compatible message item for conversations.
|
description: OpenAI-compatible message item for conversations.
|
||||||
properties:
|
properties:
|
||||||
|
|
@ -12754,33 +13050,6 @@ components:
|
||||||
- items
|
- items
|
||||||
title: ConversationItemCreateRequest
|
title: ConversationItemCreateRequest
|
||||||
type: object
|
type: object
|
||||||
ToolGroupInput:
|
|
||||||
description: Input data for registering a tool group.
|
|
||||||
properties:
|
|
||||||
toolgroup_id:
|
|
||||||
title: Toolgroup Id
|
|
||||||
type: string
|
|
||||||
provider_id:
|
|
||||||
title: Provider Id
|
|
||||||
type: string
|
|
||||||
args:
|
|
||||||
anyOf:
|
|
||||||
- additionalProperties: true
|
|
||||||
type: object
|
|
||||||
- type: 'null'
|
|
||||||
nullable: true
|
|
||||||
mcp_endpoint:
|
|
||||||
anyOf:
|
|
||||||
- $ref: '#/components/schemas/URL'
|
|
||||||
title: URL
|
|
||||||
- type: 'null'
|
|
||||||
nullable: true
|
|
||||||
title: URL
|
|
||||||
required:
|
|
||||||
- toolgroup_id
|
|
||||||
- provider_id
|
|
||||||
title: ToolGroupInput
|
|
||||||
type: object
|
|
||||||
Api:
|
Api:
|
||||||
description: Enumeration of all available APIs in the Llama Stack system.
|
description: Enumeration of all available APIs in the Llama Stack system.
|
||||||
enum:
|
enum:
|
||||||
|
|
@ -12805,6 +13074,7 @@ components:
|
||||||
- files
|
- files
|
||||||
- prompts
|
- prompts
|
||||||
- conversations
|
- conversations
|
||||||
|
- connectors
|
||||||
- inspect
|
- inspect
|
||||||
title: Api
|
title: Api
|
||||||
type: string
|
type: string
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ from llama_stack_api import (
|
||||||
Api,
|
Api,
|
||||||
Benchmark,
|
Benchmark,
|
||||||
BenchmarkInput,
|
BenchmarkInput,
|
||||||
|
ConnectorInput,
|
||||||
Dataset,
|
Dataset,
|
||||||
DatasetInput,
|
DatasetInput,
|
||||||
DatasetIO,
|
DatasetIO,
|
||||||
|
|
@ -455,6 +456,7 @@ class RegisteredResources(BaseModel):
|
||||||
scoring_fns: list[ScoringFnInput] = Field(default_factory=list)
|
scoring_fns: list[ScoringFnInput] = Field(default_factory=list)
|
||||||
benchmarks: list[BenchmarkInput] = Field(default_factory=list)
|
benchmarks: list[BenchmarkInput] = Field(default_factory=list)
|
||||||
tool_groups: list[ToolGroupInput] = Field(default_factory=list)
|
tool_groups: list[ToolGroupInput] = Field(default_factory=list)
|
||||||
|
connectors: list[ConnectorInput] = Field(default_factory=list)
|
||||||
|
|
||||||
|
|
||||||
class ServerConfig(BaseModel):
|
class ServerConfig(BaseModel):
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ from llama_stack_api import (
|
||||||
logger = get_logger(name=__name__, category="core")
|
logger = get_logger(name=__name__, category="core")
|
||||||
|
|
||||||
|
|
||||||
INTERNAL_APIS = {Api.inspect, Api.providers, Api.prompts, Api.conversations}
|
INTERNAL_APIS = {Api.inspect, Api.providers, Api.prompts, Api.conversations, Api.connectors}
|
||||||
|
|
||||||
|
|
||||||
def stack_apis() -> list[Api]:
|
def stack_apis() -> list[Api]:
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ from llama_stack_api import (
|
||||||
Batches,
|
Batches,
|
||||||
Benchmarks,
|
Benchmarks,
|
||||||
BenchmarksProtocolPrivate,
|
BenchmarksProtocolPrivate,
|
||||||
|
Connectors,
|
||||||
Conversations,
|
Conversations,
|
||||||
DatasetIO,
|
DatasetIO,
|
||||||
Datasets,
|
Datasets,
|
||||||
|
|
@ -100,6 +101,7 @@ def api_protocol_map(external_apis: dict[Api, ExternalApiSpec] | None = None) ->
|
||||||
Api.files: Files,
|
Api.files: Files,
|
||||||
Api.prompts: Prompts,
|
Api.prompts: Prompts,
|
||||||
Api.conversations: Conversations,
|
Api.conversations: Conversations,
|
||||||
|
Api.connectors: Connectors,
|
||||||
}
|
}
|
||||||
|
|
||||||
if external_apis:
|
if external_apis:
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,14 @@ from .common.type_system import (
|
||||||
ParamType,
|
ParamType,
|
||||||
StringType,
|
StringType,
|
||||||
)
|
)
|
||||||
|
from .connectors import (
|
||||||
|
Connector,
|
||||||
|
ConnectorInput,
|
||||||
|
Connectors,
|
||||||
|
ConnectorType,
|
||||||
|
ListConnectorsResponse,
|
||||||
|
ListToolsResponse,
|
||||||
|
)
|
||||||
from .conversations import (
|
from .conversations import (
|
||||||
Conversation,
|
Conversation,
|
||||||
ConversationDeletedResource,
|
ConversationDeletedResource,
|
||||||
|
|
@ -497,6 +505,10 @@ __all__ = [
|
||||||
"CommonShieldFields",
|
"CommonShieldFields",
|
||||||
"CompletionInputType",
|
"CompletionInputType",
|
||||||
"CompletionRequest",
|
"CompletionRequest",
|
||||||
|
"Connector",
|
||||||
|
"ConnectorInput",
|
||||||
|
"Connectors",
|
||||||
|
"ConnectorType",
|
||||||
"Conversation",
|
"Conversation",
|
||||||
"ConversationDeletedResource",
|
"ConversationDeletedResource",
|
||||||
"ConversationItem",
|
"ConversationItem",
|
||||||
|
|
@ -576,6 +588,7 @@ __all__ = [
|
||||||
"ListBenchmarksResponse",
|
"ListBenchmarksResponse",
|
||||||
"RegisterBenchmarkRequest",
|
"RegisterBenchmarkRequest",
|
||||||
"UnregisterBenchmarkRequest",
|
"UnregisterBenchmarkRequest",
|
||||||
|
"ListConnectorsResponse",
|
||||||
"ListDatasetsResponse",
|
"ListDatasetsResponse",
|
||||||
"ListModelsResponse",
|
"ListModelsResponse",
|
||||||
"ListOpenAIChatCompletionResponse",
|
"ListOpenAIChatCompletionResponse",
|
||||||
|
|
@ -590,6 +603,7 @@ __all__ = [
|
||||||
"ListShieldsResponse",
|
"ListShieldsResponse",
|
||||||
"ListToolDefsResponse",
|
"ListToolDefsResponse",
|
||||||
"ListToolGroupsResponse",
|
"ListToolGroupsResponse",
|
||||||
|
"ListToolsResponse",
|
||||||
"LogProbConfig",
|
"LogProbConfig",
|
||||||
"LoraFinetuningConfig",
|
"LoraFinetuningConfig",
|
||||||
"MCPListToolsTool",
|
"MCPListToolsTool",
|
||||||
|
|
|
||||||
146
src/llama_stack_api/connectors.py
Normal file
146
src/llama_stack_api/connectors.py
Normal file
|
|
@ -0,0 +1,146 @@
|
||||||
|
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# This source code is licensed under the terms described in the LICENSE file in
|
||||||
|
# the root directory of this source tree.
|
||||||
|
|
||||||
|
from enum import StrEnum
|
||||||
|
from typing import Literal, Protocol
|
||||||
|
|
||||||
|
from pydantic import BaseModel, Field
|
||||||
|
from typing_extensions import runtime_checkable
|
||||||
|
|
||||||
|
from llama_stack_api.resource import Resource, ResourceType
|
||||||
|
from llama_stack_api.schema_utils import json_schema_type, webmethod
|
||||||
|
from llama_stack_api.tools import ToolDef
|
||||||
|
from llama_stack_api.version import LLAMA_STACK_API_V1ALPHA
|
||||||
|
|
||||||
|
|
||||||
|
@json_schema_type
|
||||||
|
class ConnectorType(StrEnum):
|
||||||
|
"""Type of connector."""
|
||||||
|
|
||||||
|
MCP = "mcp"
|
||||||
|
|
||||||
|
|
||||||
|
class CommonConnectorFields(BaseModel):
|
||||||
|
"""Common fields for all connectors.
|
||||||
|
|
||||||
|
:param connector_type: Type of connector
|
||||||
|
:param connector_id: Identifier for the connector
|
||||||
|
:param url: URL of the connector
|
||||||
|
:param server_label: (Optional) Label of the server
|
||||||
|
"""
|
||||||
|
|
||||||
|
connector_type: ConnectorType = Field(default=ConnectorType.MCP)
|
||||||
|
connector_id: str = Field(..., description="Identifier for the connector")
|
||||||
|
url: str = Field(..., description="URL of the connector")
|
||||||
|
server_label: str | None = Field(default=None, description="Label of the server")
|
||||||
|
|
||||||
|
|
||||||
|
@json_schema_type
|
||||||
|
class Connector(CommonConnectorFields, Resource):
|
||||||
|
"""A connector resource representing a connector registered in Llama Stack.
|
||||||
|
|
||||||
|
:param type: Type of resource, always 'connector' for connectors
|
||||||
|
:param server_name: (Optional) Name of the server
|
||||||
|
:param server_description: (Optional) Description of the server
|
||||||
|
"""
|
||||||
|
|
||||||
|
model_config = {"populate_by_name": True}
|
||||||
|
type: Literal[ResourceType.connector] = ResourceType.connector
|
||||||
|
server_name: str | None = Field(default=None, description="Name of the server")
|
||||||
|
server_description: str | None = Field(default=None, description="Description of the server")
|
||||||
|
|
||||||
|
|
||||||
|
@json_schema_type
|
||||||
|
class ConnectorInput(CommonConnectorFields):
|
||||||
|
"""Input for creating a connector
|
||||||
|
|
||||||
|
:param type: Type of resource, always 'connector' for connectors
|
||||||
|
"""
|
||||||
|
|
||||||
|
type: Literal[ResourceType.connector] = ResourceType.connector
|
||||||
|
|
||||||
|
|
||||||
|
@json_schema_type
|
||||||
|
class ListConnectorsResponse(BaseModel):
|
||||||
|
"""Response containing a list of connectors.
|
||||||
|
|
||||||
|
:param data: List of connectors
|
||||||
|
"""
|
||||||
|
|
||||||
|
data: list[Connector]
|
||||||
|
|
||||||
|
|
||||||
|
@json_schema_type
|
||||||
|
class ListToolsResponse(BaseModel):
|
||||||
|
"""Response containing a list of tools.
|
||||||
|
|
||||||
|
:param data: List of tools
|
||||||
|
"""
|
||||||
|
|
||||||
|
data: list[ToolDef]
|
||||||
|
|
||||||
|
|
||||||
|
@runtime_checkable
|
||||||
|
class Connectors(Protocol):
|
||||||
|
# NOTE: Route order matters! More specific routes must come before less specific ones.
|
||||||
|
# Routes with {param:path} are greedy and will match everything including slashes.
|
||||||
|
|
||||||
|
@webmethod(route="/connectors", method="GET", level=LLAMA_STACK_API_V1ALPHA)
|
||||||
|
async def list_connectors(
|
||||||
|
self,
|
||||||
|
) -> ListConnectorsResponse:
|
||||||
|
"""List all configured connectors.
|
||||||
|
|
||||||
|
:returns: A ListConnectorsResponse.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
||||||
|
@webmethod(route="/connectors/{connector_id}/tools/{tool_name}", method="GET", level=LLAMA_STACK_API_V1ALPHA)
|
||||||
|
async def get_connector_tool(
|
||||||
|
self,
|
||||||
|
connector_id: str,
|
||||||
|
tool_name: str,
|
||||||
|
authorization: str | None = None,
|
||||||
|
) -> ToolDef:
|
||||||
|
"""Get a tool definition by its name from a connector.
|
||||||
|
|
||||||
|
:param connector_id: The ID of the connector to get the tool from.
|
||||||
|
:param tool_name: The name of the tool to get.
|
||||||
|
:param authorization: (Optional) OAuth access token for authenticating with the MCP server.
|
||||||
|
|
||||||
|
:returns: A ToolDef.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
||||||
|
@webmethod(route="/connectors/{connector_id}/tools", method="GET", level=LLAMA_STACK_API_V1ALPHA)
|
||||||
|
async def list_connector_tools(
|
||||||
|
self,
|
||||||
|
connector_id: str,
|
||||||
|
authorization: str | None = None,
|
||||||
|
) -> ListToolsResponse:
|
||||||
|
"""List tools available from a connector.
|
||||||
|
|
||||||
|
:param connector_id: The ID of the connector to list tools for.
|
||||||
|
:param authorization: (Optional) OAuth access token for authenticating with the MCP server.
|
||||||
|
|
||||||
|
:returns: A ListToolsResponse.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
||||||
|
@webmethod(route="/connectors/{connector_id}", method="GET", level=LLAMA_STACK_API_V1ALPHA)
|
||||||
|
async def get_connector(
|
||||||
|
self,
|
||||||
|
connector_id: str,
|
||||||
|
authorization: str | None = None,
|
||||||
|
) -> Connector:
|
||||||
|
"""Get a connector by its ID.
|
||||||
|
|
||||||
|
:param connector_id: The ID of the connector to get.
|
||||||
|
:param authorization: (Optional) OAuth access token for authenticating with the MCP server.
|
||||||
|
|
||||||
|
:returns: A Connector.
|
||||||
|
"""
|
||||||
|
...
|
||||||
|
|
@ -111,6 +111,7 @@ class Api(Enum, metaclass=DynamicApiMeta):
|
||||||
:cvar tool_groups: Tool group organization
|
:cvar tool_groups: Tool group organization
|
||||||
:cvar files: File storage and management
|
:cvar files: File storage and management
|
||||||
:cvar prompts: Prompt versions and management
|
:cvar prompts: Prompt versions and management
|
||||||
|
:cvar connectors: External connector management (e.g., MCP servers)
|
||||||
:cvar inspect: Built-in system inspection and introspection
|
:cvar inspect: Built-in system inspection and introspection
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
@ -136,6 +137,7 @@ class Api(Enum, metaclass=DynamicApiMeta):
|
||||||
files = "files"
|
files = "files"
|
||||||
prompts = "prompts"
|
prompts = "prompts"
|
||||||
conversations = "conversations"
|
conversations = "conversations"
|
||||||
|
connectors = "connectors"
|
||||||
|
|
||||||
# built-in API
|
# built-in API
|
||||||
inspect = "inspect"
|
inspect = "inspect"
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
# 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 enum import StrEnum
|
from enum import StrEnum
|
||||||
|
|
||||||
from pydantic import BaseModel, Field
|
from pydantic import BaseModel, Field
|
||||||
|
|
@ -20,6 +19,7 @@ class ResourceType(StrEnum):
|
||||||
tool = "tool"
|
tool = "tool"
|
||||||
tool_group = "tool_group"
|
tool_group = "tool_group"
|
||||||
prompt = "prompt"
|
prompt = "prompt"
|
||||||
|
connector = "connector"
|
||||||
|
|
||||||
|
|
||||||
class Resource(BaseModel):
|
class Resource(BaseModel):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue