Feat: Migrate the code operator to the new agent. #3221 (#7731)

### What problem does this PR solve?

Feat: Migrate the code operator to the new agent. #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-05-20 15:30:56 +08:00
committed by GitHub
parent 1ae7b942d9
commit 796f4032b8
6 changed files with 188 additions and 1 deletions

View File

@ -9,6 +9,7 @@ import BaiduForm from '../form/baidu-form';
import BeginForm from '../form/begin-form';
import BingForm from '../form/bing-form';
import CategorizeForm from '../form/categorize-form';
import CodeForm from '../form/code-form';
import CrawlerForm from '../form/crawler-form';
import DeepLForm from '../form/deepl-form';
import DuckDuckGoForm from '../form/duckduckgo-form';
@ -130,6 +131,17 @@ export function useFormConfigMap() {
language: z.string(),
}),
},
[Operator.Code]: {
component: CodeForm,
defaultValues: {
message_history_window_size: 6,
},
schema: z.object({
llm_id: z.string(),
message_history_window_size: z.number(),
language: z.string(),
}),
},
[Operator.Baidu]: {
component: BaiduForm,
defaultValues: { top_n: 10 },