microsoft / microsoft/azurechat

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

Open
#304 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.4k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
1

Description

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(`

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in features/chat/chat-services/chat-api-data.ts at line 85 and inspect the type expected by chatHistory.addMessage, along with nearby calls. Run the project's type-checking step and confirm the reported error is resolved on macOS or GitHub Actions.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.