microsoft / azurechat

🤖 💼 Azure Chat Solution Accelerator powered by Azure Open AI Service
MIT License
1.14k stars 954 forks source link

Type error: Type '"user"' is not assignable to type '"assistant"'. #304

Open bjareczek4tandem opened 5 months ago

bjareczek4tandem commented 5 months ago

This compiles fine on Windows, but not on macOS and not in Github actions:

This is the exception:

` Linting and checking validity of types ..Failed to compile.

./features/chat/chat-services/chat-api-data.ts:85:11 Type error: Type '"user"' is not assignable to type '"assistant"'.

83 | await chatHistory.addMessage({ 84 | content: lastHumanMessage.content,

85 | role: "user", | ^ 86 | }); 87 | 88 | await chatHistory.addMessage(`

hexglyph commented 5 months ago

Annoying error. Fix by adding your own types.