2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ export interface OpenAICompatibilityPayload {
100
100
}
101
101
102
102
export interface CopilotMessage {
103
- role : string ;
103
+ role : MessageRole ;
104
104
content : string ;
105
105
copilot_references ?: MessageCopilotReference [ ] ;
106
106
copilot_confirmations ?: MessageCopilotConfirmation [ ] ;
@@ -116,7 +116,8 @@ export interface CopilotMessage {
116
116
[ key : string ] : unknown ;
117
117
}
118
118
119
- export interface InteropMessage < TRole extends string = string > {
119
+ export type MessageRole = 'system' | 'user' | 'assistant' ;
120
+ export interface InteropMessage < TRole extends MessageRole = MessageRole > {
120
121
role : TRole ;
121
122
content : string ;
122
123
name ?: string ;
Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ export function transformPayloadForOpenAICompatibilityTest(
168
168
expectType < {
169
169
messages : {
170
170
content : string ;
171
- role : string ;
171
+ role : 'system' | 'user' | 'assistant' ;
172
172
name ?: string ;
173
173
[ key : string ] : unknown ;
174
174
} [ ] ;
0 commit comments