Azure / Azure/agent-openai-python-banking-assistant

[User Story] - Provide Support for "Per User" persistent threads

Aperta
#42 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Nessun dato sulla lingua
Stelle
2
Fork
5
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

**Description**
Provide support for persistent thread per user. User should be able to look at their last conversations and delete them as well. We can take inspiration about how this is already implemented in [azure-search-openai-demo](https://github.com/Azure-Samples/azure-search-openai-demo/blob/4d933cc02b20eaa9f9233360c89f4d0fffd60caf/docs/deploy_features.md#enabling-persistent-chat-history-with-azure-cosmos-db)

**Current Behavior**
Current thread messages are stored in memory. They get lost after each server restart.

**Acceptance Criteria**

- [ ] A new thread with a new message is created on cosmosdb every time a new chat is started with user message.
- [ ] Subsequent user messages plus agent response are stored in the thread. This will include sub-agents response as well as tool call request and results
- [ ] User can look at a Conversation History Panel in the UI and restart and old conversation
- [ ] User can select a previous conversation from the History Panel and delete it

**Design Considerations**
Use agent framework to implement a CosmosDB ChatMessageStoreProtocol. As example we can look at the current Redis [built-in implementation](https://github.com/microsoft/agent-framework/blob/main/python/packages/redis/agent_framework_redis/_chat_message_store.py). This can probably be a contribution back to agent-framework.
We might reuse most of the code already created iin azure-search-openai-demo:
- [backend](https://github.com/Azure-Samples/azure-search-openai-demo/tree/4d933cc02b20eaa9f9233360c89f4d0fffd60caf/app/backend/chat_history)
- [frontend](https://github.com/Azure-Samples/azure-search-openai-demo/tree/4d933cc02b20eaa9f9233360c89f4d0fffd60caf/app/frontend/src/components/HistoryPanel)

**Depends On**
#11

**Main Affected Modules and/or Classes**
new modules will be added.

**References**
- https://github.com/Azure-Samples/azure-search-openai-demo

---
*Migrated from: https://github.com/Azure-Samples/agent-openai-python-banking-assistant/issues/18*

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia risolvendo la dipendenza #11, quindi leggi l’implementazione Redis di ChatMessageStoreProtocol e gli esempi referenziati del backend chat_history e del frontend HistoryPanel di azure-search-openai-demo. Aggiungi i nuovi moduli di persistenza CosmosDB e il flusso dell’interfaccia utente in modo che conversazioni, messaggi, risposte dei sub-agents e chiamate agli strumenti sopravvivano ai riavvii, possano essere ripresi e possano essere eliminati dalla cronologia.

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

Valutazione

Stack tecnologico
azure, python
Ambito
backend, database, frontend
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.