mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-22 05:41:39 +03:00
59fe7b089b
* feat(chat): use openai function for answer (backend) * feat(chat): use openai function for answer (frontend) * chore: refacto BrainPicking * feat: update chat creation logic * feat: simplify chat system logic * feat: set default method to gpt-3.5-turbo-0613 * feat: use user own openai key * feat(chat): slightly improve prompts * feat: add global error interceptor * feat: remove unused endpoints * docs: update chat system doc * chore(linter): add unused import remove config * feat: improve dx * feat: improve OpenAiFunctionBasedAnswerGenerator prompt
16 lines
349 B
Python
16 lines
349 B
Python
from models.chat import Chat
|
|
from models.settings import common_dependencies
|
|
|
|
|
|
def get_chat_by_id(chat_id: str) -> Chat:
|
|
commons = common_dependencies()
|
|
|
|
response = (
|
|
commons["supabase"]
|
|
.from_("chats")
|
|
.select("*")
|
|
.filter("chat_id", "eq", chat_id)
|
|
.execute()
|
|
)
|
|
return Chat(response.data[0])
|