Update src/App.tsx
Browse files- src/App.tsx +77 -4
src/App.tsx
CHANGED
|
@@ -12,19 +12,82 @@ const initialNodes: Node<TurboNodeData>[] = [
|
|
| 12 |
{
|
| 13 |
id: '1',
|
| 14 |
position: { x: 0, y: 0 },
|
| 15 |
-
data: {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
type: 'turbo',
|
| 17 |
},
|
| 18 |
{
|
| 19 |
id: '2',
|
| 20 |
position: { x: 250, y: 0 },
|
| 21 |
-
data: {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
type: 'turbo',
|
| 23 |
},
|
| 24 |
{
|
| 25 |
id: '3',
|
| 26 |
position: { x: 500, y: 0 },
|
| 27 |
-
data: {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
type: 'turbo',
|
| 29 |
},
|
| 30 |
];
|
|
@@ -40,6 +103,16 @@ const initialEdges: Edge[] = [
|
|
| 40 |
source: '2',
|
| 41 |
target: '3',
|
| 42 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
];
|
| 44 |
|
| 45 |
const nodeTypes = {
|
|
@@ -101,4 +174,4 @@ const App = () => {
|
|
| 101 |
);
|
| 102 |
};
|
| 103 |
|
| 104 |
-
export default App;
|
|
|
|
| 12 |
{
|
| 13 |
id: '1',
|
| 14 |
position: { x: 0, y: 0 },
|
| 15 |
+
data: {
|
| 16 |
+
icon: <FunctionIcon />,
|
| 17 |
+
title: 'LLM Provider',
|
| 18 |
+
subline: 'Select the LLM provider',
|
| 19 |
+
inputFields: [],
|
| 20 |
+
options: [
|
| 21 |
+
{ id: 'provider-openai', label: 'OpenAI', checked: true },
|
| 22 |
+
{ id: 'provider-azure', label: 'Azure', checked: false },
|
| 23 |
+
{ id: 'provider-cohere', label: 'Cohere', checked: false },
|
| 24 |
+
{ id: 'provider-huggingface', label: 'Hugging Face', checked: false },
|
| 25 |
+
{ id: 'provider-anthropic', label: 'Anthropic', checked: false },
|
| 26 |
+
],
|
| 27 |
+
},
|
| 28 |
type: 'turbo',
|
| 29 |
},
|
| 30 |
{
|
| 31 |
id: '2',
|
| 32 |
position: { x: 250, y: 0 },
|
| 33 |
+
data: {
|
| 34 |
+
icon: <FunctionIcon />,
|
| 35 |
+
title: 'Model Selection',
|
| 36 |
+
subline: 'Choose the LLM model',
|
| 37 |
+
inputFields: [],
|
| 38 |
+
options: [
|
| 39 |
+
{ id: 'model-gpt-3.5-turbo', label: 'GPT-3.5-turbo', checked: true },
|
| 40 |
+
{ id: 'model-gpt-4', label: 'GPT-4', checked: false },
|
| 41 |
+
{ id: 'model-claude', label: 'Claude', checked: false },
|
| 42 |
+
{ id: 'model-flan-t5', label: 'Flan-T5', checked: false },
|
| 43 |
+
],
|
| 44 |
+
},
|
| 45 |
type: 'turbo',
|
| 46 |
},
|
| 47 |
{
|
| 48 |
id: '3',
|
| 49 |
position: { x: 500, y: 0 },
|
| 50 |
+
data: {
|
| 51 |
+
icon: <FunctionIcon />,
|
| 52 |
+
title: 'Prompt Engineering',
|
| 53 |
+
subline: 'Configure prompt settings',
|
| 54 |
+
inputFields: [
|
| 55 |
+
{ id: 'prompt-template', label: 'Prompt Template', value: '' },
|
| 56 |
+
{ id: 'prompt-examples', label: 'Prompt Examples', value: '' },
|
| 57 |
+
],
|
| 58 |
+
options: [
|
| 59 |
+
{ id: 'prompt-fewshot', label: 'Few-shot Learning', checked: false },
|
| 60 |
+
{ id: 'prompt-cot', label: 'Chain-of-Thought', checked: false },
|
| 61 |
+
],
|
| 62 |
+
},
|
| 63 |
+
type: 'turbo',
|
| 64 |
+
},
|
| 65 |
+
{
|
| 66 |
+
id: '4',
|
| 67 |
+
position: { x: 750, y: 0 },
|
| 68 |
+
data: {
|
| 69 |
+
icon: <FunctionIcon />,
|
| 70 |
+
title: 'API Settings',
|
| 71 |
+
subline: 'Set API parameters',
|
| 72 |
+
inputFields: [
|
| 73 |
+
{ id: 'api-key', label: 'API Key', value: '' },
|
| 74 |
+
{ id: 'api-base', label: 'API Base URL', value: '' },
|
| 75 |
+
],
|
| 76 |
+
options: [
|
| 77 |
+
{ id: 'api-streaming', label: 'Enable Streaming', checked: false },
|
| 78 |
+
{ id: 'api-retry', label: 'Enable Auto-Retry', checked: true },
|
| 79 |
+
],
|
| 80 |
+
},
|
| 81 |
+
type: 'turbo',
|
| 82 |
+
},
|
| 83 |
+
{
|
| 84 |
+
id: '5',
|
| 85 |
+
position: { x: 1000, y: 0 },
|
| 86 |
+
data: {
|
| 87 |
+
icon: <FiFile />,
|
| 88 |
+
title: 'Output',
|
| 89 |
+
subline: 'Generated output from LLM',
|
| 90 |
+
},
|
| 91 |
type: 'turbo',
|
| 92 |
},
|
| 93 |
];
|
|
|
|
| 103 |
source: '2',
|
| 104 |
target: '3',
|
| 105 |
},
|
| 106 |
+
{
|
| 107 |
+
id: 'e3-4',
|
| 108 |
+
source: '3',
|
| 109 |
+
target: '4',
|
| 110 |
+
},
|
| 111 |
+
{
|
| 112 |
+
id: 'e4-5',
|
| 113 |
+
source: '4',
|
| 114 |
+
target: '5',
|
| 115 |
+
},
|
| 116 |
];
|
| 117 |
|
| 118 |
const nodeTypes = {
|
|
|
|
| 174 |
);
|
| 175 |
};
|
| 176 |
|
| 177 |
+
export default App;
|