chat: serve glean chat from the platform Chat API

Aperta
#168 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go
Ambito
api, cli

Direzione di ricerca

Start with internal/client/stream.go and compare the platform-first fallback used by search and agents; check the api-client-go Chat methods named in the issue. Trace how glean chat, glean agent-help, and --dry-run are wired. Done means chat streams from /api/chat by default, GLEAN_LEGACY_APIS=1 uses the classic API, and the dry run shows the platform request shape.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

glean chat still calls the classic POST /rest/api/v1/chat through a hand-rolled NDJSON stream (internal/client/stream.go). The platform Chat API is GA, and api-client-go v0.17.3 (on main since v0.18.0) models it: Glean.Chat.Create, Glean.Chat.CreateStream and Glean.Chat.Update.

Proposal

  • Serve glean chat from POST /api/chat, streaming through Glean.Chat.CreateStream, with the same platform-first fallback that search and agents use.
  • Remove the hand-rolled stream client once the classic path is only the fallback.
  • Consider a way to continue a conversation, since the platform response carries a chat ID and PATCH /api/chats/{chat_id} exists.

Done when

  • glean agent-help shows chat with api: platform.
  • glean chat "..." streams from /api/chat by default, and GLEAN_LEGACY_APIS=1 still uses the classic API.
  • --dry-run prints the platform request shape.
Lingua principale
Go
Stelle
65
Fork
8
Merge medio
5g 7h
PR unite (30g)
3

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di gleanwork/glean-cli

Tutte le issue di gleanwork/glean-cli

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.