Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit c2d7fbd

Browse files
authored
fix: create message request with string content instead of array (#963)
1 parent 4b6523c commit c2d7fbd

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

cortex-js/src/infrastructure/commanders/services/chat-client.ts

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,7 @@ export class ChatClient {
103103

104104
const createMessageDto: Cortex.Beta.Threads.Messages.MessageCreateParams = {
105105
role: 'user',
106-
content: [
107-
{
108-
type: 'text',
109-
text: userInput,
110-
},
111-
],
106+
content: userInput,
112107
};
113108
this.cortex.beta.threads.messages.create(threadId, createMessageDto);
114109

@@ -145,12 +140,7 @@ export class ChatClient {
145140
this.cortex.beta.threads.messages
146141
.create(threadId, {
147142
role: 'assistant',
148-
content: [
149-
{
150-
type: 'text',
151-
text: assistantResponse,
152-
},
153-
],
143+
content: assistantResponse,
154144
})
155145
.then(() => {
156146
assistantResponse = '';

0 commit comments

Comments
 (0)