-
Notifications
You must be signed in to change notification settings - Fork 94
LCORE-2572: Minor fixes #1944
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LCORE-2572: Minor fixes #1944
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2616,16 +2616,23 @@ Accepts both user-facing rag_id (from LCORE config) and llama-stack | |
| vector_store_id. If a rag_id from config is provided, it is resolved | ||
| to the underlying vector_store_id for the llama-stack lookup. | ||
|
|
||
| Returns: | ||
| RAGInfoResponse: A single RAG's details. | ||
| ### Parameters: | ||
| - request: The incoming HTTP request (used by middleware). | ||
| - rag_id: rag_id or llama-stack vector_store_id | ||
| - auth: Authentication tuple from the auth dependency (used by middleware). | ||
|
|
||
| Raises: | ||
| HTTPException: | ||
| - 401: Authentication failed | ||
| - 403: Authorization failed | ||
| - 404: RAG with the given ID not found | ||
| - 500: Lightspeed Stack configuration not loaded | ||
| - 503: Unable to connect to Llama Stack | ||
| ### Raises: | ||
| - HTTPException: with status 401 for unauthorized access. | ||
| - HTTPException: with status 403 if permission is denied. | ||
| - HTTPException: with status 404 if rag_id is not found. | ||
| - HTTPException: with status 422 for incorrect request payload. | ||
| - HTTPException: with status 500 and a detail object containing `response` | ||
| and `cause` when service configuration is wrong or incomplete. | ||
| - HTTPException: with status 503 and a detail object containing `response` | ||
| and `cause` when unable to connect to Llama Stack. | ||
|
|
||
| ### Returns: | ||
| - RAGInfoResponse: A single RAG's details. | ||
|
|
||
|
|
||
|
|
||
|
|
@@ -5461,8 +5468,17 @@ Serve the A2A Agent Card at the well-known location. | |
| This endpoint provides the agent card that describes Lightspeed's | ||
| capabilities according to the A2A protocol specification. | ||
|
|
||
| Returns: | ||
| AgentCard: The agent card describing this agent's capabilities. | ||
| ### Parameters: | ||
| - auth: Authentication tuple from the auth dependency (used by middleware). | ||
|
|
||
| ### Raises: | ||
| - HTTPException: with status 500 and a detail object containing `response` | ||
| and `cause` when service configuration is wrong or incomplete. | ||
| - HTTPException: with status 503 and a detail object containing `response` | ||
| and `cause` when unable to connect to Llama Stack. | ||
|
|
||
| ### Returns: | ||
| - AgentCard: The agent card describing this agent's capabilities. | ||
|
Comment on lines
+5471
to
+5481
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add blank lines around these headings. These blocks hit the markdownlint MD022 warning, and the current layout can render inconsistently in Markdown viewers. 🛠️ Suggested fix-This endpoint provides the agent card that describes Lightspeed's
-capabilities according to the A2A protocol specification.
-### Parameters:
+This endpoint provides the agent card that describes Lightspeed's
+capabilities according to the A2A protocol specification.
+
+### Parameters:
+
- auth: Authentication tuple from the auth dependency (used by middleware).Also applies to: 5502-5512, 5596-5603 🧰 Tools🪛 markdownlint-cli2 (0.22.1)[warning] 5471-5471: Headings should be surrounded by blank lines (MD022, blanks-around-headings) [warning] 5474-5474: Headings should be surrounded by blank lines (MD022, blanks-around-headings) [warning] 5480-5480: Headings should be surrounded by blank lines (MD022, blanks-around-headings) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||
|
|
||
|
|
||
|
|
||
|
|
@@ -5483,8 +5499,17 @@ Serve the A2A Agent Card at the well-known location. | |
| This endpoint provides the agent card that describes Lightspeed's | ||
| capabilities according to the A2A protocol specification. | ||
|
|
||
| Returns: | ||
| AgentCard: The agent card describing this agent's capabilities. | ||
| ### Parameters: | ||
| - auth: Authentication tuple from the auth dependency (used by middleware). | ||
|
|
||
| ### Raises: | ||
| - HTTPException: with status 500 and a detail object containing `response` | ||
| and `cause` when service configuration is wrong or incomplete. | ||
| - HTTPException: with status 503 and a detail object containing `response` | ||
| and `cause` when unable to connect to Llama Stack. | ||
|
|
||
| ### Returns: | ||
| - AgentCard: The agent card describing this agent's capabilities. | ||
|
|
||
|
|
||
|
|
||
|
|
@@ -5568,8 +5593,14 @@ Returns: | |
|
|
||
| Health check endpoint for A2A service. | ||
|
|
||
| Returns: | ||
| Dict with health status information. | ||
| ### Parameters: | ||
| - None | ||
|
|
||
| ### Raises: | ||
| - None | ||
|
|
||
| ### Returns: | ||
| - Dict with health status information. | ||
|
|
||
|
|
||
|
|
||
|
|
@@ -5879,6 +5910,7 @@ Authentication configuration. | |
| | jwk_config | | | | ||
| | api_key_config | | | | ||
| | rh_identity_config | | | | ||
| | trusted_proxy_config | | | | ||
|
|
||
|
|
||
| ## AuthorizationCodeOAuthFlow | ||
|
|
@@ -5974,6 +6006,11 @@ BYOK (Bring Your Own Knowledge) RAG configuration. | |
| | vector_db_id | string | Vector database identification. | | ||
| | db_path | string | Path to RAG database. | | ||
| | score_multiplier | number | Multiplier applied to relevance scores from this vector store. Used to weight results when querying multiple knowledge sources. Values > 1 boost this store's results; values < 1 reduce them. | | ||
| | host | | PostgreSQL host for remote::pgvector. Defaults to ${env.POSTGRES_HOST} when rag_type is remote::pgvector. | | ||
| | port | | PostgreSQL port for remote::pgvector. Defaults to ${env.POSTGRES_PORT} when rag_type is remote::pgvector. | | ||
| | db | | PostgreSQL database name for remote::pgvector. Defaults to ${env.POSTGRES_DATABASE} when rag_type is remote::pgvector. | | ||
| | user | | PostgreSQL user for remote::pgvector. Defaults to ${env.POSTGRES_USER} when rag_type is remote::pgvector. | | ||
| | password | | PostgreSQL password for remote::pgvector. Defaults to ${env.POSTGRES_PASSWORD} when rag_type is remote::pgvector. | | ||
|
|
||
|
|
||
| ## CORSConfiguration | ||
|
|
@@ -6142,6 +6179,7 @@ Attributes: | |
|
|
||
| | Field | Type | Description | | ||
| |-------|------|-------------| | ||
| | deleted | boolean | Whether the deletion was successful. | | ||
| | conversation_id | string | The conversation ID (UUID) that was deleted. | | ||
| | success | boolean | Whether the deletion was successful. | | ||
| | response | string | A message about the deletion result. | | ||
|
|
@@ -6250,13 +6288,6 @@ Model representing a request to update a conversation topic summary. | |
| Attributes: | ||
| topic_summary: The new topic summary for the conversation. | ||
|
|
||
| Example: | ||
| ```python | ||
| update_request = ConversationUpdateRequest( | ||
| topic_summary="Discussion about machine learning algorithms" | ||
| ) | ||
| ``` | ||
|
|
||
|
|
||
| | Field | Type | Description | | ||
| |-------|------|-------------| | ||
|
|
@@ -6273,15 +6304,6 @@ Attributes: | |
| success: Whether the update was successful. | ||
| message: A message about the update result. | ||
|
|
||
| Example: | ||
| ```python | ||
| update_response = ConversationUpdateResponse( | ||
| conversation_id="123e4567-e89b-12d3-a456-426614174000", | ||
| success=True, | ||
| message="Topic summary updated successfully", | ||
| ) | ||
| ``` | ||
|
|
||
|
|
||
| | Field | Type | Description | | ||
| |-------|------|-------------| | ||
|
|
@@ -6397,18 +6419,6 @@ Attributes: | |
| user_feedback: The optional user feedback. | ||
| categories: The optional list of feedback categories (multi-select for negative feedback). | ||
|
|
||
| Example: | ||
| ```python | ||
| feedback_request = FeedbackRequest( | ||
| conversation_id="12345678-abcd-0000-0123-456789abcdef", | ||
| user_question="what are you doing?", | ||
| user_feedback="This response is not helpful", | ||
| llm_response="I don't know", | ||
| sentiment=-1, | ||
| categories=[FeedbackCategory.INCORRECT, FeedbackCategory.INCOMPLETE] | ||
| ) | ||
| ``` | ||
|
|
||
|
|
||
| | Field | Type | Description | | ||
| |-------|------|-------------| | ||
|
|
@@ -6428,11 +6438,6 @@ Model representing a response to a feedback request. | |
| Attributes: | ||
| response: The response of the feedback request. | ||
|
|
||
| Example: | ||
| ```python | ||
| feedback_response = FeedbackResponse(response="feedback received") | ||
| ``` | ||
|
|
||
|
|
||
| | Field | Type | Description | | ||
| |-------|------|-------------| | ||
|
|
@@ -6447,13 +6452,6 @@ Model representing a feedback status update request. | |
| Attributes: | ||
| status: Value of the desired feedback enabled state. | ||
|
|
||
| Example: | ||
| ```python | ||
| feedback_request = FeedbackRequest( | ||
| status=false | ||
| ) | ||
| ``` | ||
|
|
||
|
|
||
| | Field | Type | Description | | ||
| |-------|------|-------------| | ||
|
|
@@ -6468,18 +6466,6 @@ Model representing a response to a feedback status update request. | |
| Attributes: | ||
| status: The previous and current status of the service and who updated it. | ||
|
|
||
| Example: | ||
| ```python | ||
| status_response = StatusResponse( | ||
| status={ | ||
| "previous_status": true, | ||
| "updated_status": false, | ||
| "updated_by": "user/test", | ||
| "timestamp": "2023-03-15 12:34:56" | ||
| }, | ||
| ) | ||
| ``` | ||
|
|
||
|
|
||
| | Field | Type | Description | | ||
| |-------|------|-------------| | ||
|
|
@@ -6618,15 +6604,6 @@ Attributes: | |
| service_version: Service version. | ||
| llama_stack_version: Llama Stack version. | ||
|
|
||
| Example: | ||
| ```python | ||
| info_response = InfoResponse( | ||
| name="Lightspeed Stack", | ||
| service_version="1.0.0", | ||
| llama_stack_version="0.2.22", | ||
| ) | ||
| ``` | ||
|
|
||
|
|
||
| | Field | Type | Description | | ||
| |-------|------|-------------| | ||
|
|
@@ -6635,6 +6612,24 @@ Example: | |
| | llama_stack_version | string | Llama Stack version | | ||
|
|
||
|
|
||
| ## InputToolMCP | ||
|
|
||
|
|
||
| MCP input tool with authorization included when serializing request bodies. | ||
|
|
||
|
|
||
| | Field | Type | Description | | ||
| |-------|------|-------------| | ||
| | type | string | | | ||
| | server_label | string | | | ||
| | connector_id | | | | ||
| | server_url | | | | ||
| | headers | | | | ||
| | authorization | | | | ||
| | require_approval | | | | ||
| | allowed_tools | | | | ||
|
|
||
|
|
||
| ## InternalServerErrorResponse | ||
|
|
||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -291,9 +291,15 @@ async def update_prompt_handler( | |
| - body: Prompt update parameters. | ||
|
|
||
| ### Raises: | ||
| - HTTPException: If configuration is not loaded, if the prompt is not | ||
| found, if unable to connect to Llama Stack, or if the prompts API returns | ||
| an error response. | ||
| - HTTPException: with status 400 when request format is not valid. | ||
| - HTTPException: with status 401 for unauthorized access. | ||
| - HTTPException: with status 403 if permission is denied. | ||
| - HTTPException: with status 404 if prompt is not found. | ||
| - HTTPException: with status 422 if request payload is corrupted. | ||
| - HTTPException: with status 500 and a detail object containing `response` | ||
| and `cause` when service configuration is wrong or incomplete. | ||
| - HTTPException: with status 503 and a detail object containing `response` | ||
| and `cause` when unable to connect to Llama Stack. | ||
|
|
||
| ### Returns: | ||
| - PromptResourceResponse: The updated prompt object returned by Llama Stack. | ||
|
|
@@ -352,8 +358,13 @@ async def delete_prompt_handler( | |
| - auth: Authentication tuple from the auth dependency (used by middleware). | ||
|
|
||
| ### Raises: | ||
| - HTTPException: If configuration is not loaded, if unable to connect to | ||
| Llama Stack, or if the prompts API returns an error response. | ||
| - HTTPException: with status 401 for unauthorized access. | ||
| - HTTPException: with status 403 if permission is denied. | ||
| - HTTPException: with status 422 if request payload is corrupted. | ||
| - HTTPException: with status 500 and a detail object containing `response` | ||
| and `cause` when service configuration is wrong or incomplete. | ||
| - HTTPException: with status 503 and a detail object containing `response` | ||
| and `cause` when unable to connect to Llama Stack. | ||
|
Comment on lines
360
to
+367
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing HTTP 400 status code in delete_prompt_handler docstring. The Raises section omits status 400, but the implementation at line 378–381 raises The docstring should document all status codes that the endpoint can return, including 400 for invalid prompt ID format. 📋 Proposed docstring update ### Raises:
+ - HTTPException: with status 400 when request format is not valid.
- HTTPException: with status 401 for unauthorized access.
- HTTPException: with status 403 if permission is denied.
- HTTPException: with status 422 if request payload is corrupted.🤖 Prompt for AI Agents |
||
|
|
||
| ### Returns: | ||
| - PromptDeleteResponse: An object describing whether the prompt was | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OpenAPI schema is out of date and fails CI validation.
The pipeline has flagged that
docs/openapi.jsondoes not match the schema generated by the build process. The diff command shows a mismatch against/tmp/openapi-generated.json. OpenAPI JSON files should be auto-generated from source docstrings rather than manually edited.You must regenerate the OpenAPI schema using the provided script before this PR can merge.
Regenerate the OpenAPI schema:
Ensure the Python docstrings in
src/app/endpoints/prompts.pyandsrc/app/endpoints/rags.pymatch the description updates shown in these hunks, then commit the regenerateddocs/openapi.json.Also applies to: 2980-2984, 3211-3214, 3384-3387
🤖 Prompt for AI Agents
Source: Pipeline failures