Skip to content

Commit

Permalink
fix(search): compatibility with latest openai lib
Browse files Browse the repository at this point in the history
  • Loading branch information
sinedied committed Feb 29, 2024
1 parent 6f314a6 commit 33d62a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/search/src/lib/message.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export type MessageRole = 'system' | 'user' | 'assistant' | 'function';
export type MessageRole = 'system' | 'user' | 'assistant';

export interface Message {
role: MessageRole;
Expand Down
4 changes: 2 additions & 2 deletions packages/search/src/plugins/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ export const chatRequestSchema = {
type: 'object',
properties: {
content: { type: 'string' },
// can be only: assistant, user, system or function
// can be only: assistant, user, system
role: {
type: 'string',
enum: ['system', 'user', 'assistant', 'function'],
enum: ['system', 'user', 'assistant'],
},
},
required: ['content', 'role'],
Expand Down

0 comments on commit 33d62a4

Please sign in to comment.