feat: 工作台聊天室功能
This commit is contained in:
@@ -3,6 +3,31 @@ export interface ApiErrorResponse {
|
||||
status: number;
|
||||
}
|
||||
|
||||
export interface Conversation {
|
||||
createdAt: string;
|
||||
id: string;
|
||||
modelId: string;
|
||||
projectId: string;
|
||||
title: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
export interface ConversationListResponse {
|
||||
items: Conversation[];
|
||||
page: number;
|
||||
pageSize: number;
|
||||
total: number;
|
||||
}
|
||||
|
||||
export interface ConversationResponse {
|
||||
conversation: Conversation;
|
||||
}
|
||||
|
||||
export interface CreateConversationRequest {
|
||||
modelId?: string;
|
||||
title?: string;
|
||||
}
|
||||
|
||||
export interface CreateModelRequest {
|
||||
capabilities: ModelCapability[];
|
||||
contextLength?: null | number;
|
||||
@@ -29,6 +54,22 @@ export interface CreateProviderRequest {
|
||||
type: ProviderType;
|
||||
}
|
||||
|
||||
export interface Message {
|
||||
content: string;
|
||||
conversationId: string;
|
||||
createdAt: string;
|
||||
id: string;
|
||||
parts: null | string;
|
||||
role: "assistant" | "system" | "user";
|
||||
}
|
||||
|
||||
export interface MessageListResponse {
|
||||
items: Message[];
|
||||
page: number;
|
||||
pageSize: number;
|
||||
total: number;
|
||||
}
|
||||
|
||||
export interface MetaResponse {
|
||||
ok: true;
|
||||
service: string;
|
||||
@@ -58,6 +99,11 @@ export type ModelCapability =
|
||||
| "video-generation"
|
||||
| "video-recognition";
|
||||
|
||||
export interface SendMessageRequest {
|
||||
conversationId: string;
|
||||
messages: Array<{ content: string; role: "assistant" | "system" | "user" }>;
|
||||
}
|
||||
|
||||
export const MODEL_CAPABILITIES: readonly ModelCapability[] = [
|
||||
"audio-generation",
|
||||
"audio-recognition",
|
||||
|
||||
Reference in New Issue
Block a user