File size: 431 Bytes
6e1a53e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from embedchain import App
from fastapi import APIRouter

from utils.embedchain import EC_APP_CONFIG

ec_app = App.from_config(config=EC_APP_CONFIG)

router = APIRouter()


@router.get("/api/v1/admin/chat_history")
async def get_all_chat_history():
    chat_history = ec_app.llm.memory.get(
        app_id=ec_app.config.id,
        num_rounds=100,
        display_format=True,
        fetch_all=True,
    )
    return chat_history