Skip to content

Commit

Permalink
fix: empty assistant instruction by default
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-jan committed Dec 5, 2023
1 parent 27b62ed commit 29d46aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion extensions/assistant-extension/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default class JanAssistantExtension implements AssistantExtension {
name: "Jan",
description: "A default assistant that can use all downloaded models",
model: "*",
instructions: "Your name is Jan.",
instructions: "",
tools: undefined,
file_ids: [],
metadata: undefined,
Expand Down
2 changes: 2 additions & 0 deletions web/hooks/useSendChatMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export default function useSendChatMessage() {
const messages: ChatCompletionMessage[] = [
activeThread.assistants[0]?.instructions,
]
.filter((e) => e && e.trim() !== '')
.map<ChatCompletionMessage>((instructions) => {
const systemMessage: ChatCompletionMessage = {
role: ChatCompletionRole.System,
Expand Down Expand Up @@ -138,6 +139,7 @@ export default function useSendChatMessage() {
const messages: ChatCompletionMessage[] = [
activeThread.assistants[0]?.instructions,
]
.filter((e) => e && e.trim() !== '')
.map<ChatCompletionMessage>((instructions) => {
const systemMessage: ChatCompletionMessage = {
role: ChatCompletionRole.System,
Expand Down

0 comments on commit 29d46aa

Please sign in to comment.