refactor: update LLM configuration to model ID in API and frontend
- Replaced LLMConfig with model_id in TextRelationExtractionRequest and FabriTextRequest interfaces. - Updated related API handlers to retrieve chat models based on model_id. - Adjusted frontend components to pass model_id instead of LLMConfig, enhancing clarity and simplifying the configuration process. These changes streamline the model configuration process across the application, improving maintainability and usability.
This commit is contained in:
@@ -412,7 +412,7 @@ export function testMultimodalFunction(testData: {
|
||||
export interface TextRelationExtractionRequest {
|
||||
text: string;
|
||||
tags: string[];
|
||||
llm_config: LLMConfig;
|
||||
model_id: string;
|
||||
}
|
||||
|
||||
export interface Node {
|
||||
@@ -426,13 +426,6 @@ export interface Relation {
|
||||
type: string;
|
||||
}
|
||||
|
||||
export interface LLMConfig {
|
||||
source: 'local' | 'remote';
|
||||
model_name: string;
|
||||
base_url: string;
|
||||
api_key: string;
|
||||
}
|
||||
|
||||
export interface TextRelationExtractionResponse {
|
||||
nodes: Node[];
|
||||
relations: Relation[];
|
||||
@@ -454,7 +447,7 @@ export function extractTextRelations(request: TextRelationExtractionRequest): Pr
|
||||
|
||||
export interface FabriTextRequest {
|
||||
tags: string[];
|
||||
llm_config: LLMConfig;
|
||||
model_id: string;
|
||||
}
|
||||
|
||||
export interface FabriTextResponse {
|
||||
@@ -476,7 +469,6 @@ export function fabriText(request: FabriTextRequest): Promise<FabriTextResponse>
|
||||
}
|
||||
|
||||
export interface FabriTagRequest {
|
||||
llm_config: LLMConfig;
|
||||
}
|
||||
|
||||
export interface FabriTagResponse {
|
||||
|
||||
Reference in New Issue
Block a user