Handle Tool Result Messages
- Lingua principale
- Python
- Stelle
- 0
- Fork
- 1
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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"`.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- api, backend
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 50/100