tmp
zhaoqingang
2024-12-31 bde5797004bfb040003c1495027c4ae99d8f9f9a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from app.service.v2.app_driver.chat_base import ChatBase
 
 
class ChatDialog(ChatBase):
 
 
    def __init__(self, token):
        self.token = token
 
 
    async def get_headers(self):
        return {
            'Content-Type': 'application/json',
            'Authorization': f'Bearer {self.token}'
        }
 
 
    async def chat_completions(self):
        async for rag_response in self.http_stream(token, chat_id, chat_history):
            ...