Handle Tool Result Messages
- Vorherrschende Sprache
- Python
- Sterne
- 0
- Forks
- 1
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
To complete the loop, the API must be able to accept the result of a tool call from the user and feed it back to the model to generate the final human-readable response.
**Acceptance Criteria:**
- The `/v1/chat/completions` endpoint can now accept a `messages` list that includes a message with `role: "tool"`.
- This tool message (containing the result from the function the user executed) is correctly formatted and added to the conversation history sent to the model.
- The model then uses this result to generate a final text answer, and the endpoint returns a standard response with `finish_reason: "stop"`.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
The work is in the `/v1/chat/completions` endpoint. Look at the request handling and message list validation. The model interaction logic needs to accept a `role: "tool"` message, format it correctly into the conversation history, and ensure the model uses it to generate a final answer with `finish_reason: "stop"`. Check existing tests for the endpoint to understand the expected request/response format.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- api, backend
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 50/100