Added llama3 prompt

This commit is contained in:
Saurab-Shrestha9639*969**9858//852 2024-04-24 17:15:13 +05:45
parent 3282d52bf2
commit 1d6fc7144a
7 changed files with 61 additions and 10 deletions

View file

@ -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()
)