diff --git a/docs/models/common.puml b/docs/models/common.puml index 42f754979..fe2017b04 100644 --- a/docs/models/common.puml +++ b/docs/models/common.puml @@ -216,6 +216,7 @@ class "ResponsesContext" as src.models.common.responses.contexts.ResponsesContex model_config : ConfigDict moderation_result : Optional[ShieldModerationResult] rh_identity_context : Optional[tuple[str, str]] + root_span : Span started_at : Optional[datetime] user_agent : Optional[str] } diff --git a/docs/models/common.svg b/docs/models/common.svg index 18e82fa16..5f1fadea2 100644 --- a/docs/models/common.svg +++ b/docs/models/common.svg @@ -410,30 +410,31 @@ - - - - ResponsesContext - - auth : Optional[tuple[str, str, bool, str]] - background_tasks : Optional[BackgroundTasks] - client : Optional[AsyncOgxClient] - compacted_original_input : Optional[ResponseInput] - endpoint_path : Optional[str] - filter_server_tools : Optional[bool] - generate_topic_summary : Optional[bool] - inline_rag_context : Optional[RAGContext] - input_text : Optional[str] - model_config : ConfigDict - moderation_result : Optional[ShieldModerationResult] - rh_identity_context : Optional[tuple[str, str]] - started_at : Optional[datetime] - user_agent : Optional[str] - + + + + ResponsesContext + + auth : Optional[tuple[str, str, bool, str]] + background_tasks : Optional[BackgroundTasks] + client : Optional[AsyncOgxClient] + compacted_original_input : Optional[ResponseInput] + endpoint_path : Optional[str] + filter_server_tools : Optional[bool] + generate_topic_summary : Optional[bool] + inline_rag_context : Optional[RAGContext] + input_text : Optional[str] + model_config : ConfigDict + moderation_result : Optional[ShieldModerationResult] + rh_identity_context : Optional[tuple[str, str]] + root_span : Span + started_at : Optional[datetime] + user_agent : Optional[str] + - + ResponsesConversationContext @@ -446,7 +447,7 @@ - + ShieldModerationBlocked @@ -459,7 +460,7 @@ - + ShieldModerationPassed @@ -469,7 +470,7 @@ - + SkillMetadata @@ -480,7 +481,7 @@ - + SolrVectorSearchRequest @@ -493,7 +494,7 @@ - + StartEventData @@ -504,7 +505,7 @@ - + StartStreamPayload @@ -516,7 +517,7 @@ - + StreamPayloadBase @@ -528,7 +529,7 @@ - + TokenChunkData @@ -539,7 +540,7 @@ - + TokenStreamPayload @@ -552,7 +553,7 @@ - + ToolCallStreamPayload @@ -564,7 +565,7 @@ - + ToolCallSummary @@ -577,7 +578,7 @@ - + ToolInfoSummary @@ -589,7 +590,7 @@ - + ToolResultStreamPayload @@ -601,7 +602,7 @@ - + ToolResultSummary @@ -615,7 +616,7 @@ - + Transcript @@ -633,7 +634,7 @@ - + TranscriptMetadata @@ -649,7 +650,7 @@ - + TurnCompleteStreamPayload @@ -661,7 +662,7 @@ - + TurnSummary @@ -680,86 +681,86 @@ - + - + - + - + - + - + - + - + - + data - + data - + data - + data - + data - + data - + metadata - + diff --git a/docs/models/successful_responses.json b/docs/models/successful_responses.json index a6a28e70e..116eca131 100644 --- a/docs/models/successful_responses.json +++ b/docs/models/successful_responses.json @@ -4466,7 +4466,7 @@ "type": "string" }, "model_prompt": { - "default": "\nInstructions:\n- You are a question classifying tool\n- You are an expert in kubernetes and openshift\n- Your job is to determine where or a user's question is related to kubernetes and/or openshift technologies and to provide a one-word response.\n- If a question appears to be related to kubernetes or openshift technologies, answer with the word ${allowed}, otherwise answer with the word ${rejected}.\n- Do not explain your answer, just provide the one-word response. Do not give any other response.\n- If the given question is an empty string, answer with the word ${rejected}\n\n\nExample Question:\nWhy is the sky blue?\nExample Response:\n${rejected}\n\nExample Question:\nWhy is the grass green?\nExample Response:\n${rejected}\n\nExample Question:\nWhy is sand yellow?\nExample Response:\n${rejected}\n\nExample Question:\nCan you help configure my cluster to automatically scale?\nExample Response:\n${allowed}\n\nQuestion:\n${message}\nResponse:\n", + "default": "\nInstructions:\n- You are a question classifying tool\n- You are an expert in Kubernetes and OpenShift\n- Your job is to determine where or a user's question is related to Kubernetes and/or OpenShift technologies and to provide a one-word response.\n- If a question appears to be related to Kubernetes or OpenShift technologies, answer with the word ${allowed}, otherwise answer with the word ${rejected}.\n- Do not explain your answer, just provide the one-word response. Do not give any other response.\n- If the given question is an empty string, answer with the word ${rejected}\n\n\nExample Question:\nWhy is the sky blue?\nExample Response:\n${rejected}\n\nExample Question:\nWhy is the grass green?\nExample Response:\n${rejected}\n\nExample Question:\nWhy is sand yellow?\nExample Response:\n${rejected}\n\nExample Question:\nCan you help configure my cluster to automatically scale?\nExample Response:\n${allowed}\n\nQuestion:\n${message}\nResponse:\n", "description": "The default prompt sent to the LLM used to validate the Users' question.", "title": "Model prompt", "type": "string" diff --git a/tests/unit/app/endpoints/README.md b/tests/unit/app/endpoints/README.md index 71655b2fe..061aa2596 100644 --- a/tests/unit/app/endpoints/README.md +++ b/tests/unit/app/endpoints/README.md @@ -8,6 +8,10 @@ Unit tests for endpoints implementations. Shared pytest fixtures for endpoint unit tests. +## [responses_otel_helpers.py](responses_otel_helpers.py) + +Shared helpers for responses endpoint OpenTelemetry unit tests. + ## [test_a2a.py](test_a2a.py) Unit tests for the A2A (Agent-to-Agent) protocol endpoints. @@ -76,6 +80,10 @@ Unit tests for the /rags REST API endpoints. Unit tests for the /responses REST API endpoint (LCORE Responses API). +## [test_responses_otel.py](test_responses_otel.py) + +OpenTelemetry unit tests for the /responses REST API endpoint. + ## [test_responses_splunk.py](test_responses_splunk.py) Unit tests for Splunk telemetry in the /responses endpoint.