Implement the Core Orchestration Logic
- Vorherrschende Sprache
- Python
- Sterne
- 0
- Forks
- 1
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
This is the heart of the feature. The `/v1/chat/completions` endpoint needs to be updated to handle the first half of the tool-use loop: receiving a request with tools, calling the model, and returning a `tool_calls` response if the model decides to use a tool.
**Acceptance Criteria:**
- If a request to `/v1/chat/completions` includes the `tools` parameter, the endpoint passes them to the adapter.
- The endpoint logic inspects the model's response.
- If the model's response contains a request to call a function, the API call finishes and returns an `OpenAIChatResponse`.
- This response object's `finish_reason` is `"tool_calls"`, and the `message` contains the `tool_calls` list with the function name and arguments.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
The work is in the `/v1/chat/completions` endpoint. Start by locating the endpoint handler in the codebase. Understand the existing request flow and the adapter interface for passing tools. The model's response must be inspected to detect a function call request. The finish_reason must be set to 'tool_calls' and the message must contain the tool_calls list. Look for existing tests for the chat completions endpoint to understand the expected response format.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- api, backend
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100