-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: optimize chat memory * feat: pr comments fix * feat: pr fixes * feat: add types to ai.service methods
- Loading branch information
1 parent
7262a50
commit 2706f49
Showing
9 changed files
with
95 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
packages/api/src/chats/exceptions/redis-chat-memory-not-found.exception.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { HttpException, HttpStatus } from '@nestjs/common'; | ||
|
||
export const RedisChatMemoryNotFoundExceptionSchema = { | ||
type: 'object', | ||
properties: { | ||
statusCode: { | ||
type: 'number', | ||
example: 404, | ||
}, | ||
message: { | ||
type: 'array', | ||
items: { | ||
type: 'string', | ||
example: 'redis_chat: not_found', | ||
}, | ||
}, | ||
error: { | ||
type: 'string', | ||
example: 'Redis chat memory does not exist', | ||
}, | ||
}, | ||
required: ['statusCode', 'message', 'error'], | ||
}; | ||
|
||
export class RedisChatMemoryNotFoundException extends HttpException { | ||
constructor() { | ||
super( | ||
{ | ||
statusCode: HttpStatus.NOT_FOUND, | ||
message: ['redis_chat: not_found'], | ||
error: 'Redis chat does not exist', | ||
}, | ||
HttpStatus.NOT_FOUND | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters