mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-04 18:13:44 +00:00
Merge branch 'main' into fix-type-hints-syntax
This commit is contained in:
commit
47027c65a0
12 changed files with 394 additions and 321 deletions
|
|
@ -104,23 +104,19 @@ client.toolgroups.register(
|
|||
)
|
||||
```
|
||||
|
||||
Note that most of the more useful MCP servers need you to authenticate with them. Many of them use OAuth2.0 for authentication. You can provide authorization headers to send to the MCP server using the "Provider Data" abstraction provided by Llama Stack. When making an agent call,
|
||||
Note that most of the more useful MCP servers need you to authenticate with them. Many of them use OAuth2.0 for authentication. You can provide the authorization token when creating the Agent:
|
||||
|
||||
```python
|
||||
agent = Agent(
|
||||
...,
|
||||
tools=["mcp::deepwiki"],
|
||||
extra_headers={
|
||||
"X-LlamaStack-Provider-Data": json.dumps(
|
||||
{
|
||||
"mcp_headers": {
|
||||
"http://mcp.deepwiki.com/sse": {
|
||||
"Authorization": "Bearer <your_access_token>",
|
||||
},
|
||||
},
|
||||
}
|
||||
),
|
||||
},
|
||||
tools=[
|
||||
{
|
||||
"type": "mcp",
|
||||
"server_url": "https://mcp.deepwiki.com/sse",
|
||||
"server_label": "mcp::deepwiki",
|
||||
"authorization": "<your_access_token>", # OAuth token (without "Bearer " prefix)
|
||||
}
|
||||
],
|
||||
)
|
||||
agent.create_turn(...)
|
||||
```
|
||||
|
|
|
|||
133
docs/static/deprecated-llama-stack-spec.yaml
vendored
133
docs/static/deprecated-llama-stack-spec.yaml
vendored
|
|
@ -193,7 +193,7 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/RegisterScoringFunctionRequestLoose'
|
||||
$ref: '#/components/schemas/RegisterScoringFunctionRequest'
|
||||
required: true
|
||||
deprecated: true
|
||||
/v1/scoring-functions/{scoring_fn_id}:
|
||||
|
|
@ -549,7 +549,7 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/RegisterDatasetRequestLoose'
|
||||
$ref: '#/components/schemas/RegisterDatasetRequest'
|
||||
required: true
|
||||
deprecated: true
|
||||
/v1beta/datasets/{dataset_id}:
|
||||
|
|
@ -7429,6 +7429,14 @@ components:
|
|||
- scores
|
||||
title: EvaluateResponse
|
||||
description: The response from an evaluation.
|
||||
RunEvalRequest:
|
||||
properties:
|
||||
benchmark_config:
|
||||
$ref: '#/components/schemas/BenchmarkConfig'
|
||||
type: object
|
||||
required:
|
||||
- benchmark_config
|
||||
title: RunEvalRequest
|
||||
Job:
|
||||
properties:
|
||||
job_id:
|
||||
|
|
@ -8012,6 +8020,67 @@ components:
|
|||
- $ref: '#/components/schemas/CompletionInputType'
|
||||
title: CompletionInputType
|
||||
title: StringType | ... (9 variants)
|
||||
RegisterScoringFunctionRequest:
|
||||
properties:
|
||||
scoring_fn_id:
|
||||
type: string
|
||||
title: Scoring Fn Id
|
||||
description:
|
||||
type: string
|
||||
title: Description
|
||||
return_type:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/StringType'
|
||||
title: StringType
|
||||
- $ref: '#/components/schemas/NumberType'
|
||||
title: NumberType
|
||||
- $ref: '#/components/schemas/BooleanType'
|
||||
title: BooleanType
|
||||
- $ref: '#/components/schemas/ArrayType'
|
||||
title: ArrayType
|
||||
- $ref: '#/components/schemas/ObjectType'
|
||||
title: ObjectType
|
||||
- $ref: '#/components/schemas/JsonType'
|
||||
title: JsonType
|
||||
- $ref: '#/components/schemas/UnionType'
|
||||
title: UnionType
|
||||
- $ref: '#/components/schemas/ChatCompletionInputType'
|
||||
title: ChatCompletionInputType
|
||||
- $ref: '#/components/schemas/CompletionInputType'
|
||||
title: CompletionInputType
|
||||
title: StringType | ... (9 variants)
|
||||
provider_scoring_fn_id:
|
||||
anyOf:
|
||||
- type: string
|
||||
- type: 'null'
|
||||
provider_id:
|
||||
anyOf:
|
||||
- type: string
|
||||
- type: 'null'
|
||||
params:
|
||||
anyOf:
|
||||
- oneOf:
|
||||
- $ref: '#/components/schemas/LLMAsJudgeScoringFnParams'
|
||||
title: LLMAsJudgeScoringFnParams
|
||||
- $ref: '#/components/schemas/RegexParserScoringFnParams'
|
||||
title: RegexParserScoringFnParams
|
||||
- $ref: '#/components/schemas/BasicScoringFnParams'
|
||||
title: BasicScoringFnParams
|
||||
discriminator:
|
||||
propertyName: type
|
||||
mapping:
|
||||
basic: '#/components/schemas/BasicScoringFnParams'
|
||||
llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams'
|
||||
regex_parser: '#/components/schemas/RegexParserScoringFnParams'
|
||||
title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams
|
||||
- type: 'null'
|
||||
title: Params
|
||||
type: object
|
||||
required:
|
||||
- scoring_fn_id
|
||||
- description
|
||||
- return_type
|
||||
title: RegisterScoringFunctionRequest
|
||||
RegisterShieldRequest:
|
||||
properties:
|
||||
shield_id:
|
||||
|
|
@ -8070,6 +8139,31 @@ components:
|
|||
- $ref: '#/components/schemas/RowsDataSource'
|
||||
title: RowsDataSource
|
||||
title: URIDataSource | RowsDataSource
|
||||
RegisterDatasetRequest:
|
||||
properties:
|
||||
purpose:
|
||||
$ref: '#/components/schemas/DatasetPurpose'
|
||||
source:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/URIDataSource'
|
||||
title: URIDataSource
|
||||
- $ref: '#/components/schemas/RowsDataSource'
|
||||
title: RowsDataSource
|
||||
title: URIDataSource | RowsDataSource
|
||||
metadata:
|
||||
anyOf:
|
||||
- additionalProperties: true
|
||||
type: object
|
||||
- type: 'null'
|
||||
dataset_id:
|
||||
anyOf:
|
||||
- type: string
|
||||
- type: 'null'
|
||||
type: object
|
||||
required:
|
||||
- purpose
|
||||
- source
|
||||
title: RegisterDatasetRequest
|
||||
RegisterBenchmarkRequest:
|
||||
properties:
|
||||
benchmark_id:
|
||||
|
|
@ -8806,41 +8900,6 @@ components:
|
|||
required:
|
||||
- reasoning_tokens
|
||||
title: OutputTokensDetails
|
||||
RegisterDatasetRequestLoose:
|
||||
properties:
|
||||
purpose:
|
||||
title: Purpose
|
||||
source:
|
||||
title: Source
|
||||
metadata:
|
||||
title: Metadata
|
||||
dataset_id:
|
||||
title: Dataset Id
|
||||
type: object
|
||||
required:
|
||||
- purpose
|
||||
- source
|
||||
title: RegisterDatasetRequestLoose
|
||||
RegisterScoringFunctionRequestLoose:
|
||||
properties:
|
||||
scoring_fn_id:
|
||||
title: Scoring Fn Id
|
||||
description:
|
||||
title: Description
|
||||
return_type:
|
||||
title: Return Type
|
||||
provider_scoring_fn_id:
|
||||
title: Provider Scoring Fn Id
|
||||
provider_id:
|
||||
title: Provider Id
|
||||
params:
|
||||
title: Params
|
||||
type: object
|
||||
required:
|
||||
- scoring_fn_id
|
||||
- description
|
||||
- return_type
|
||||
title: RegisterScoringFunctionRequestLoose
|
||||
SearchRankingOptions:
|
||||
properties:
|
||||
ranker:
|
||||
|
|
|
|||
10
docs/static/experimental-llama-stack-spec.yaml
vendored
10
docs/static/experimental-llama-stack-spec.yaml
vendored
|
|
@ -300,7 +300,7 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/BenchmarkConfig'
|
||||
$ref: '#/components/schemas/RunEvalRequest'
|
||||
required: true
|
||||
/v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}:
|
||||
get:
|
||||
|
|
@ -6711,6 +6711,14 @@ components:
|
|||
- scores
|
||||
title: EvaluateResponse
|
||||
description: The response from an evaluation.
|
||||
RunEvalRequest:
|
||||
properties:
|
||||
benchmark_config:
|
||||
$ref: '#/components/schemas/BenchmarkConfig'
|
||||
type: object
|
||||
required:
|
||||
- benchmark_config
|
||||
title: RunEvalRequest
|
||||
Job:
|
||||
properties:
|
||||
job_id:
|
||||
|
|
|
|||
135
docs/static/stainless-llama-stack-spec.yaml
vendored
135
docs/static/stainless-llama-stack-spec.yaml
vendored
|
|
@ -1810,7 +1810,7 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/RegisterScoringFunctionRequestLoose'
|
||||
$ref: '#/components/schemas/RegisterScoringFunctionRequest'
|
||||
required: true
|
||||
deprecated: true
|
||||
/v1/scoring-functions/{scoring_fn_id}:
|
||||
|
|
@ -3300,7 +3300,7 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/RegisterDatasetRequestLoose'
|
||||
$ref: '#/components/schemas/RegisterDatasetRequest'
|
||||
required: true
|
||||
deprecated: true
|
||||
/v1beta/datasets/{dataset_id}:
|
||||
|
|
@ -3557,7 +3557,7 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/BenchmarkConfig'
|
||||
$ref: '#/components/schemas/RunEvalRequest'
|
||||
required: true
|
||||
/v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}:
|
||||
get:
|
||||
|
|
@ -10586,6 +10586,14 @@ components:
|
|||
- scores
|
||||
title: EvaluateResponse
|
||||
description: The response from an evaluation.
|
||||
RunEvalRequest:
|
||||
properties:
|
||||
benchmark_config:
|
||||
$ref: '#/components/schemas/BenchmarkConfig'
|
||||
type: object
|
||||
required:
|
||||
- benchmark_config
|
||||
title: RunEvalRequest
|
||||
Job:
|
||||
properties:
|
||||
job_id:
|
||||
|
|
@ -11169,6 +11177,67 @@ components:
|
|||
- $ref: '#/components/schemas/CompletionInputType'
|
||||
title: CompletionInputType
|
||||
title: StringType | ... (9 variants)
|
||||
RegisterScoringFunctionRequest:
|
||||
properties:
|
||||
scoring_fn_id:
|
||||
type: string
|
||||
title: Scoring Fn Id
|
||||
description:
|
||||
type: string
|
||||
title: Description
|
||||
return_type:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/StringType'
|
||||
title: StringType
|
||||
- $ref: '#/components/schemas/NumberType'
|
||||
title: NumberType
|
||||
- $ref: '#/components/schemas/BooleanType'
|
||||
title: BooleanType
|
||||
- $ref: '#/components/schemas/ArrayType'
|
||||
title: ArrayType
|
||||
- $ref: '#/components/schemas/ObjectType'
|
||||
title: ObjectType
|
||||
- $ref: '#/components/schemas/JsonType'
|
||||
title: JsonType
|
||||
- $ref: '#/components/schemas/UnionType'
|
||||
title: UnionType
|
||||
- $ref: '#/components/schemas/ChatCompletionInputType'
|
||||
title: ChatCompletionInputType
|
||||
- $ref: '#/components/schemas/CompletionInputType'
|
||||
title: CompletionInputType
|
||||
title: StringType | ... (9 variants)
|
||||
provider_scoring_fn_id:
|
||||
anyOf:
|
||||
- type: string
|
||||
- type: 'null'
|
||||
provider_id:
|
||||
anyOf:
|
||||
- type: string
|
||||
- type: 'null'
|
||||
params:
|
||||
anyOf:
|
||||
- oneOf:
|
||||
- $ref: '#/components/schemas/LLMAsJudgeScoringFnParams'
|
||||
title: LLMAsJudgeScoringFnParams
|
||||
- $ref: '#/components/schemas/RegexParserScoringFnParams'
|
||||
title: RegexParserScoringFnParams
|
||||
- $ref: '#/components/schemas/BasicScoringFnParams'
|
||||
title: BasicScoringFnParams
|
||||
discriminator:
|
||||
propertyName: type
|
||||
mapping:
|
||||
basic: '#/components/schemas/BasicScoringFnParams'
|
||||
llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams'
|
||||
regex_parser: '#/components/schemas/RegexParserScoringFnParams'
|
||||
title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams
|
||||
- type: 'null'
|
||||
title: Params
|
||||
type: object
|
||||
required:
|
||||
- scoring_fn_id
|
||||
- description
|
||||
- return_type
|
||||
title: RegisterScoringFunctionRequest
|
||||
RegisterShieldRequest:
|
||||
properties:
|
||||
shield_id:
|
||||
|
|
@ -11227,6 +11296,31 @@ components:
|
|||
- $ref: '#/components/schemas/RowsDataSource'
|
||||
title: RowsDataSource
|
||||
title: URIDataSource | RowsDataSource
|
||||
RegisterDatasetRequest:
|
||||
properties:
|
||||
purpose:
|
||||
$ref: '#/components/schemas/DatasetPurpose'
|
||||
source:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/URIDataSource'
|
||||
title: URIDataSource
|
||||
- $ref: '#/components/schemas/RowsDataSource'
|
||||
title: RowsDataSource
|
||||
title: URIDataSource | RowsDataSource
|
||||
metadata:
|
||||
anyOf:
|
||||
- additionalProperties: true
|
||||
type: object
|
||||
- type: 'null'
|
||||
dataset_id:
|
||||
anyOf:
|
||||
- type: string
|
||||
- type: 'null'
|
||||
type: object
|
||||
required:
|
||||
- purpose
|
||||
- source
|
||||
title: RegisterDatasetRequest
|
||||
RegisterBenchmarkRequest:
|
||||
properties:
|
||||
benchmark_id:
|
||||
|
|
@ -11963,41 +12057,6 @@ components:
|
|||
required:
|
||||
- reasoning_tokens
|
||||
title: OutputTokensDetails
|
||||
RegisterDatasetRequestLoose:
|
||||
properties:
|
||||
purpose:
|
||||
title: Purpose
|
||||
source:
|
||||
title: Source
|
||||
metadata:
|
||||
title: Metadata
|
||||
dataset_id:
|
||||
title: Dataset Id
|
||||
type: object
|
||||
required:
|
||||
- purpose
|
||||
- source
|
||||
title: RegisterDatasetRequestLoose
|
||||
RegisterScoringFunctionRequestLoose:
|
||||
properties:
|
||||
scoring_fn_id:
|
||||
title: Scoring Fn Id
|
||||
description:
|
||||
title: Description
|
||||
return_type:
|
||||
title: Return Type
|
||||
provider_scoring_fn_id:
|
||||
title: Provider Scoring Fn Id
|
||||
provider_id:
|
||||
title: Provider Id
|
||||
params:
|
||||
title: Params
|
||||
type: object
|
||||
required:
|
||||
- scoring_fn_id
|
||||
- description
|
||||
- return_type
|
||||
title: RegisterScoringFunctionRequestLoose
|
||||
SearchRankingOptions:
|
||||
properties:
|
||||
ranker:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue