chat-ui / src /lib /Types.ts
coyotte508's picture
coyotte508 HF staff
🔨 Add VSCode config to lint/prettier on save
ed0f702
raw
history blame
406 Bytes
export type Message =
| {
from: 'user';
content: string;
}
| {
from: 'bot';
content: string;
};
export interface Token {
id: number;
text: string;
logprob: number;
special: boolean;
}
export interface StreamResponse {
/**
* Generated token
*/
token: Token;
/**
* Complete generated text
* Only available when the generation is finished
*/
generated_text?: string;
}