mirror of
https://github.com/zylon-ai/private-gpt.git
synced 2025-12-22 20:12:55 +01:00
Added llama3 prompt
This commit is contained in:
parent
3282d52bf2
commit
1d6fc7144a
7 changed files with 61 additions and 10 deletions
|
|
@ -27,12 +27,14 @@ class CRUDChat(CRUDBase[ChatHistory, ChatHistoryCreate, ChatHistoryCreate]):
|
|||
return chat_history
|
||||
|
||||
def get_chat_history(
|
||||
self, db: Session, *,user_id:int
|
||||
self, db: Session, *,user_id:int, skip: int = 0, limit: int =100
|
||||
) -> List[ChatHistory]:
|
||||
return (
|
||||
db.query(self.model)
|
||||
.filter(ChatHistory.user_id == user_id)
|
||||
.order_by(desc(getattr(ChatHistory, 'created_at')))
|
||||
.offset(skip)
|
||||
.limit(limit)
|
||||
.all()
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue