|
4605 | 4605 | }
|
4606 | 4606 | }
|
4607 | 4607 | },
|
| 4608 | + "/v1/inference/rerank": { |
| 4609 | + "post": { |
| 4610 | + "responses": { |
| 4611 | + "200": { |
| 4612 | + "description": "RerankResponse with indices sorted by relevance score (descending).", |
| 4613 | + "content": { |
| 4614 | + "application/json": { |
| 4615 | + "schema": { |
| 4616 | + "$ref": "#/components/schemas/RerankResponse" |
| 4617 | + } |
| 4618 | + } |
| 4619 | + } |
| 4620 | + }, |
| 4621 | + "400": { |
| 4622 | + "$ref": "#/components/responses/BadRequest400" |
| 4623 | + }, |
| 4624 | + "429": { |
| 4625 | + "$ref": "#/components/responses/TooManyRequests429" |
| 4626 | + }, |
| 4627 | + "500": { |
| 4628 | + "$ref": "#/components/responses/InternalServerError500" |
| 4629 | + }, |
| 4630 | + "default": { |
| 4631 | + "$ref": "#/components/responses/DefaultError" |
| 4632 | + } |
| 4633 | + }, |
| 4634 | + "tags": [ |
| 4635 | + "Inference" |
| 4636 | + ], |
| 4637 | + "description": "Rerank a list of documents based on their relevance to a query.", |
| 4638 | + "parameters": [], |
| 4639 | + "requestBody": { |
| 4640 | + "content": { |
| 4641 | + "application/json": { |
| 4642 | + "schema": { |
| 4643 | + "$ref": "#/components/schemas/RerankRequest" |
| 4644 | + } |
| 4645 | + } |
| 4646 | + }, |
| 4647 | + "required": true |
| 4648 | + } |
| 4649 | + } |
| 4650 | + }, |
4608 | 4651 | "/v1/agents/{agent_id}/session/{session_id}/turn/{turn_id}/resume": {
|
4609 | 4652 | "post": {
|
4610 | 4653 | "responses": {
|
|
16587 | 16630 | ],
|
16588 | 16631 | "title": "RegisterVectorDbRequest"
|
16589 | 16632 | },
|
| 16633 | + "RerankRequest": { |
| 16634 | + "type": "object", |
| 16635 | + "properties": { |
| 16636 | + "model": { |
| 16637 | + "type": "string", |
| 16638 | + "description": "The identifier of the reranking model to use." |
| 16639 | + }, |
| 16640 | + "query": { |
| 16641 | + "oneOf": [ |
| 16642 | + { |
| 16643 | + "type": "string" |
| 16644 | + }, |
| 16645 | + { |
| 16646 | + "$ref": "#/components/schemas/OpenAIChatCompletionContentPartTextParam" |
| 16647 | + }, |
| 16648 | + { |
| 16649 | + "$ref": "#/components/schemas/OpenAIChatCompletionContentPartImageParam" |
| 16650 | + } |
| 16651 | + ], |
| 16652 | + "description": "The search query to rank items against. Can be a string, text content part, or image content part. The input must not exceed the model's max input token length." |
| 16653 | + }, |
| 16654 | + "items": { |
| 16655 | + "type": "array", |
| 16656 | + "items": { |
| 16657 | + "oneOf": [ |
| 16658 | + { |
| 16659 | + "type": "string" |
| 16660 | + }, |
| 16661 | + { |
| 16662 | + "$ref": "#/components/schemas/OpenAIChatCompletionContentPartTextParam" |
| 16663 | + }, |
| 16664 | + { |
| 16665 | + "$ref": "#/components/schemas/OpenAIChatCompletionContentPartImageParam" |
| 16666 | + } |
| 16667 | + ] |
| 16668 | + }, |
| 16669 | + "description": "List of items to rerank. Each item can be a string, text content part, or image content part. Each input must not exceed the model's max input token length." |
| 16670 | + }, |
| 16671 | + "max_num_results": { |
| 16672 | + "type": "integer", |
| 16673 | + "description": "(Optional) Maximum number of results to return. Default: returns all." |
| 16674 | + } |
| 16675 | + }, |
| 16676 | + "additionalProperties": false, |
| 16677 | + "required": [ |
| 16678 | + "model", |
| 16679 | + "query", |
| 16680 | + "items" |
| 16681 | + ], |
| 16682 | + "title": "RerankRequest" |
| 16683 | + }, |
| 16684 | + "RerankData": { |
| 16685 | + "type": "object", |
| 16686 | + "properties": { |
| 16687 | + "index": { |
| 16688 | + "type": "integer", |
| 16689 | + "description": "The original index of the document in the input list" |
| 16690 | + }, |
| 16691 | + "relevance_score": { |
| 16692 | + "type": "number", |
| 16693 | + "description": "The relevance score from the model output. Values are inverted when applicable so that higher scores indicate greater relevance." |
| 16694 | + } |
| 16695 | + }, |
| 16696 | + "additionalProperties": false, |
| 16697 | + "required": [ |
| 16698 | + "index", |
| 16699 | + "relevance_score" |
| 16700 | + ], |
| 16701 | + "title": "RerankData", |
| 16702 | + "description": "A single rerank result from a reranking response." |
| 16703 | + }, |
| 16704 | + "RerankResponse": { |
| 16705 | + "type": "object", |
| 16706 | + "properties": { |
| 16707 | + "data": { |
| 16708 | + "type": "array", |
| 16709 | + "items": { |
| 16710 | + "$ref": "#/components/schemas/RerankData" |
| 16711 | + }, |
| 16712 | + "description": "List of rerank result objects, sorted by relevance score (descending)" |
| 16713 | + } |
| 16714 | + }, |
| 16715 | + "additionalProperties": false, |
| 16716 | + "required": [ |
| 16717 | + "data" |
| 16718 | + ], |
| 16719 | + "title": "RerankResponse", |
| 16720 | + "description": "Response from a reranking request." |
| 16721 | + }, |
16590 | 16722 | "ResumeAgentTurnRequest": {
|
16591 | 16723 | "type": "object",
|
16592 | 16724 | "properties": {
|
|
0 commit comments