Define meaningful `LMStudioPredictionError` subclasses
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- python
- Ambito
- backend-api-design
Direzione di ricerca
Inizia individuando la definizione esistente di LMStudioPredictionError e i sei percorsi di gestione di predictions e tool-call descritti nell’issue. Traccia come vengono attualmente esposti i messaggi del server, le richieste di tool non valide e le chiamate ai tool fallite, quindi implementa e verifica la gerarchia delle eccezioni proposta e il contesto strutturato per ogni caso mappato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
LMStudioPredictionError is raised/reported in the following cases:
- the server sends an "error" message on the prediction's streaming channel
- the server sends a "toolCallGenerationFailed" message on the prediction's streaming channel
- the server sends a tool request on the final round of an
.act()call (when tool requests are disabled) - the server sends a tool request for an unknown tool name
- the server sends a tool request for a known tool, but parsing the tool parameters fails
- a valid tool call request raises an unhandled Python exception during execution
The first two are raised directly by the SDK, the last three are processed through the handle_invalid_tool_request callback (which defaults to sending them back to the LLM as text rather than raising them locally). The "tool call request when tool requests are disabled" handling is currently a hybrid of the two: handle_invalid_tool_request is invoked, but without any request details, and the exception is raised directly by the SDK (since the LLM interaction is complete, the invalid call can't be reported back to the LLM to fix)
Each of these could meaningfully report additional structured information:
- the two server errors could report the triggering message from the server
- the four tool call request errors could report the request that resulted in the error
- tool calls with invalid args could report the tool details in addition to the tool call request
- failed tool calls could report the raised exception (as
__cause__), the parsed tool call args, and the tool details
Potential hierarchy:
- LMStudioPredictionError
- LMStudioServerPredictionError
- LMStudioToolCallError
- LMStudioServerToolCallError # Also inherits from LMStudioServerPredictionError
- LMStudioToolCallInvalidError
- LMStudioToolCallUnknownError
- LMStudioToolCallInvalidArgsError
- LMStudioToolCallFailedError # Has __cause__ set to the unhandled tool call exception
The 6 specific cases would then map to
- server "error" message ->
LMStudioServerPredictionError - server "toolCallGenerationFailed" message ->
LMStudioServerToolCallError - unknown tool name ->
LMStudioToolCallUnknownError - parsing the tool parameters fails ->
LMStudioToolCallInvalidArgsError - tool request when tool requests are disabled ->
LMStudioToolCallInvalidError(no dedicated subclass) - unhandled Python exception ->
LMStudioToolCallFailedError
- Lingua principale
- Python
- Stelle
- 881
- Fork
- 166
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di lmstudio-ai/lmstudio-python
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
lmstudio-ai/lmstudio-python#186 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
lmstudio-ai/lmstudio-python#184 ·
-
Reasoning parametersAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
lmstudio-ai/lmstudio-python#183 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
lmstudio-ai/lmstudio-python#182 · 1 reazione ·
-
error code: 502Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 32/100
lmstudio-ai/lmstudio-python#180 ·
Tutte le issue di lmstudio-ai/lmstudio-python
Issue simili
-
[Bug] Unit tests reach real Bedrock call paths without patching the modelForse già presa @proton0210 l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
aws-samples/sample-aws-genai-db-modernizer#1318 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
pyarrow-25.0.1-cp310-cp310-manylinux_2_28_x86_64.whl: 1 vulnerabilities (highest severity is: 5.3)ApertaMend: dependency security vulnerability
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
capitalone/locopy#394 ·
-
[Bug] Unhandled ValueError terminates watchdog thread when GISRC value contains multiple colonsApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
sdk-typescript: unquoted COPY globs in shell form are silently dropped from the image build contextApertabug javascript
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
ietf-tools/datatracker#11922 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno