fix: cannot query chat history (#6539)

This commit is contained in:
darkskygit
2024-04-12 12:16:42 +00:00
parent fc51b68674
commit 2336638996
2 changed files with 15 additions and 5 deletions
@@ -187,7 +187,16 @@ export class ChatSessionService {
userId: true,
workspaceId: true,
docId: true,
messages: true,
messages: {
select: {
role: true,
content: true,
createdAt: true,
},
orderBy: {
createdAt: 'asc',
},
},
prompt: {
select: {
name: true,
@@ -197,6 +206,7 @@ export class ChatSessionService {
select: {
role: true,
content: true,
createdAt: true,
},
orderBy: {
idx: 'asc',
+4 -4
View File
@@ -28,6 +28,8 @@ export interface Scalars {
Float: { input: number; output: number };
/** A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format. */
DateTime: { input: string; output: string };
/** The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */
JSON: { input: string; output: string };
/** The `SafeInt` scalar type represents non-fractional signed whole numeric values that are considered safe as defined by the ECMAScript specification. */
SafeInt: { input: number; output: number };
/** The `Upload` scalar type represents a file upload. */
@@ -36,14 +38,12 @@ export interface Scalars {
export interface CreateChatMessageInput {
attachments: InputMaybe<Array<Scalars['String']['input']>>;
content: Scalars['String']['input'];
params: InputMaybe<Scalars['String']['input']>;
content: InputMaybe<Scalars['String']['input']>;
params: InputMaybe<Scalars['JSON']['input']>;
sessionId: Scalars['String']['input'];
}
export interface CreateChatSessionInput {
/** An mark identifying which view to use to display the session */
action: InputMaybe<Scalars['String']['input']>;
docId: Scalars['String']['input'];
/** The prompt name to use for the session */
promptName: Scalars['String']['input'];