Kaynağa Gözat

fix(demo): free layout constant (#257)

Yiwei Mao 7 ay önce
ebeveyn
işleme
5b56be0ec2

+ 16 - 4
apps/demo-free-layout/src/initial-data.ts

@@ -248,10 +248,22 @@ export const initialData: FlowDocumentJSON = {
           data: {
             title: 'LLM_0',
             inputsValues: {
-              modelType: 'gpt-3.5-turbo',
-              temperature: 0.5,
-              systemPrompt: 'You are an AI assistant.',
-              prompt: '',
+              modelType: {
+                type: 'constant',
+                content: 'gpt-3.5-turbo',
+              },
+              temperature: {
+                type: 'constant',
+                content: 0.5,
+              },
+              systemPrompt: {
+                type: 'constant',
+                content: 'You are an AI assistant.',
+              },
+              prompt: {
+                type: 'constant',
+                content: '',
+              },
             },
             inputs: {
               type: 'object',

+ 1 - 1
packages/materials/form-materials/src/components/constant-input/config.json

@@ -1,6 +1,6 @@
 
 {
   "name": "constant-input",
-  "depMaterials": [],
+  "depMaterials": ["typings/json-schema"],
   "depPackages": ["@douyinfe/semi-ui"]
 }