mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-07-17 09:56:06 +00:00
feat: finish update pipline but left some bugs
This commit is contained in:
@@ -57,9 +57,6 @@ export interface ApiRespPipelines {
|
||||
pipelines: Pipeline[];
|
||||
}
|
||||
|
||||
export interface ApiRespPipeline {
|
||||
pipeline: Pipeline;
|
||||
}
|
||||
|
||||
export interface Pipeline {
|
||||
uuid: string;
|
||||
@@ -215,3 +212,94 @@ export interface MarketPluginResponse {
|
||||
plugins: MarketPlugin[];
|
||||
total: number;
|
||||
}
|
||||
|
||||
|
||||
interface GetPipelineConfig {
|
||||
ai: {
|
||||
"dashscope-app-api": {
|
||||
"api-key": string;
|
||||
"app-id": string;
|
||||
"app-type": "agent" | "workflow";
|
||||
"references-quote"?: string;
|
||||
};
|
||||
"dify-service-api": {
|
||||
"api-key": string;
|
||||
"app-type": "chat" | "agent" | "workflow";
|
||||
"base-url": string;
|
||||
"thinking-convert": "plain" | "original" | "remove";
|
||||
timeout?: number;
|
||||
};
|
||||
"local-agent": {
|
||||
"max-round": number;
|
||||
model: string;
|
||||
prompt: Array<{
|
||||
content: string;
|
||||
role: string;
|
||||
}>;
|
||||
};
|
||||
runner: {
|
||||
runner: "local-agent" | "dify-service-api" | "dashscope-app-api";
|
||||
};
|
||||
};
|
||||
output: {
|
||||
"force-delay": {
|
||||
max: number;
|
||||
min: number;
|
||||
};
|
||||
"long-text-processing": {
|
||||
"font-path": string;
|
||||
strategy: "forward" | "image";
|
||||
threshold: number;
|
||||
};
|
||||
misc: {
|
||||
"at-sender": boolean;
|
||||
"hide-exception": boolean;
|
||||
"quote-origin": boolean;
|
||||
"track-function-calls": boolean;
|
||||
};
|
||||
};
|
||||
safety: {
|
||||
"content-filter": {
|
||||
"check-sensitive-words": boolean;
|
||||
scope: "all" | "income-msg" | "output-msg";
|
||||
};
|
||||
"rate-limit": {
|
||||
limitation: number;
|
||||
strategy: "drop" | "wait";
|
||||
"window-length": number;
|
||||
};
|
||||
};
|
||||
trigger: {
|
||||
"access-control": {
|
||||
blacklist: string[];
|
||||
mode: "blacklist" | "whitelist";
|
||||
whitelist: string[];
|
||||
};
|
||||
"group-respond-rules": {
|
||||
at: boolean;
|
||||
prefix: string[];
|
||||
random: number;
|
||||
regexp: string[];
|
||||
};
|
||||
"ignore-rules": {
|
||||
prefix: string[];
|
||||
regexp: string[];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
interface GetPipeline {
|
||||
config: GetPipelineConfig;
|
||||
created_at: string;
|
||||
description: string;
|
||||
for_version: string;
|
||||
is_default: boolean;
|
||||
name: string;
|
||||
stages: string[];
|
||||
updated_at: string;
|
||||
uuid: string;
|
||||
}
|
||||
|
||||
export interface GetPipelineResponseData {
|
||||
pipeline: GetPipeline;
|
||||
}
|
||||
@@ -27,7 +27,7 @@ import {
|
||||
ApiRespAsyncTasks,
|
||||
ApiRespAsyncTask,
|
||||
ApiRespUserToken,
|
||||
MarketPluginResponse
|
||||
MarketPluginResponse, GetPipelineResponseData
|
||||
} from "../api/api-types";
|
||||
import { notification } from "antd";
|
||||
|
||||
@@ -258,7 +258,7 @@ class HttpClient {
|
||||
return this.get("/api/v1/pipelines");
|
||||
}
|
||||
|
||||
public getPipeline(uuid: string): Promise<ApiRespPipeline> {
|
||||
public getPipeline(uuid: string): Promise<GetPipelineResponseData> {
|
||||
return this.get(`/api/v1/pipelines/${uuid}`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user