feat: annotation management frontend (#1764)

This commit is contained in:
Joel
2023-12-18 15:41:24 +08:00
committed by GitHub
parent 96d2de2258
commit 65fd4b39ce
122 changed files with 4718 additions and 214 deletions

View File

@ -73,6 +73,16 @@ export type SpeechToTextConfig = MoreLikeThisConfig
export type CitationConfig = MoreLikeThisConfig
export type AnnotationReplyConfig = {
id: string
enabled: boolean
score_threshold: number
embedding_model: {
embedding_provider_name: string
embedding_model_name: string
}
}
export type ModerationContentConfig = {
enabled: boolean
preset_response?: string

View File

@ -51,13 +51,19 @@ export type ModelConfigDetail = {
completion_params: CompletionParamsType
}
export type Annotation = {
export type LogAnnotation = {
content: string
account: {
id: string
name: string
email: string
}
}
export type Annotation = {
id: string
authorName: string
logAnnotation?: LogAnnotation
created_at?: number
}
@ -73,7 +79,16 @@ export type MessageContent = {
answer: string
provider_response_latency: number
created_at: number
annotation: Annotation
annotation: LogAnnotation
annotation_hit_history: {
annotation_id: string
annotation_create_account: {
id: string
name: string
email: string
}
created_at: number
}
feedbacks: Array<{
rating: 'like' | 'dislike' | null
content: string | null