-
Notifications
You must be signed in to change notification settings - Fork 58
LCORE-460: sequence diagram for query endpoint #791
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
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 | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,43 @@ | ||||||||||||||||||||||||||||||||||
| @startuml | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| participant Client | ||||||||||||||||||||||||||||||||||
| participant Endpoint as "Query Endpoint handler" | ||||||||||||||||||||||||||||||||||
| participant Auth | ||||||||||||||||||||||||||||||||||
| participant LlamaStack as "Llama Stack Client" | ||||||||||||||||||||||||||||||||||
| participant Cache as Cache | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
|
Comment on lines
+1
to
+8
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. Declare the DB participant or remove the interaction. Lines 14-15 reference a "DB" participant that is never declared at the top of the diagram. PlantUML participant declarations at lines 3-7 do not include DB. Either declare DB as a participant: @startuml
participant Client
participant Endpoint as "Query Endpoint handler"
participant Auth
participant LlamaStack as "Llama Stack Client"
participant Cache as Cache
+participant DB as "Database"
Client->>Endpoint: POST /query + attachmentsOr, if the database interaction should remain implicit and not shown in the diagram, remove lines 14-15. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||
| Client->>Endpoint: POST /query + attachments | ||||||||||||||||||||||||||||||||||
| Endpoint->>Auth: Validate auth & permissions | ||||||||||||||||||||||||||||||||||
| Auth-->>Endpoint: Authorized ✓ | ||||||||||||||||||||||||||||||||||
| Endpoint->>Auth: Check config & token quota | ||||||||||||||||||||||||||||||||||
| Auth-->>Endpoint: Config valid, tokens available | ||||||||||||||||||||||||||||||||||
| Endpoint->>DB: Retrieve user conversation (optional) | ||||||||||||||||||||||||||||||||||
| DB-->>Endpoint: UserConversation or None | ||||||||||||||||||||||||||||||||||
| Endpoint->>Endpoint: Select model/provider from hints/config | ||||||||||||||||||||||||||||||||||
| Endpoint->>LlamaStack: Get model capabilities | ||||||||||||||||||||||||||||||||||
| LlamaStack-->>Endpoint: Capabilities response | ||||||||||||||||||||||||||||||||||
| Endpoint->>Endpoint: Build system prompt, toolgroups, MCP headers | ||||||||||||||||||||||||||||||||||
| Endpoint->>LlamaStack: Create turn (agent interaction) | ||||||||||||||||||||||||||||||||||
| LlamaStack-->>Endpoint: Turn response + tool calls + RAG chunks | ||||||||||||||||||||||||||||||||||
| Endpoint->>Endpoint: Parse metadata & referenced documents | ||||||||||||||||||||||||||||||||||
| Endpoint->>Endpoint: Transform to QueryResponse | ||||||||||||||||||||||||||||||||||
| Endpoint->>DB: Persist conversation metadata (model, topic, count) | ||||||||||||||||||||||||||||||||||
| Endpoint->>Cache: Store conversation with timing metadata | ||||||||||||||||||||||||||||||||||
| Endpoint-->>Client: Return QueryResponse + token metrics | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| alt Connection Error | ||||||||||||||||||||||||||||||||||
| LlamaStack-->>Endpoint: APIConnectionError | ||||||||||||||||||||||||||||||||||
| Endpoint-->>Client: HTTP 500 | ||||||||||||||||||||||||||||||||||
| end | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| alt Quota Exceeded | ||||||||||||||||||||||||||||||||||
| Auth-->>Endpoint: Rate limit violation | ||||||||||||||||||||||||||||||||||
| Endpoint-->>Client: HTTP 429 | ||||||||||||||||||||||||||||||||||
| end | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| alt Invalid Request | ||||||||||||||||||||||||||||||||||
| Endpoint-->>Client: Missing/invalid conversation or attachments | ||||||||||||||||||||||||||||||||||
| Endpoint-->>Client: HTTP 400/403/404 | ||||||||||||||||||||||||||||||||||
| end | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| @enduml | ||||||||||||||||||||||||||||||||||
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.
Fix list indentation for System prompt subsections (markdownlint MD007).
The three new subsections under "System prompt" use inconsistent indentation. Based on markdownlint feedback, these should use 4-space indentation instead of 8 spaces to align with the expected nested list structure.
📝 Committable suggestion
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
37-37: Unordered list indentation
Expected: 4; Actual: 8
(MD007, ul-indent)
38-38: Unordered list indentation
Expected: 4; Actual: 8
(MD007, ul-indent)
39-39: Unordered list indentation
Expected: 4; Actual: 8
(MD007, ul-indent)
🤖 Prompt for AI Agents