61 lines
3.9 KiB
JSON
61 lines
3.9 KiB
JSON
{
|
|
"id": "pipeline_editor",
|
|
"name": "Edited Pipeline",
|
|
"nodes": [
|
|
{
|
|
"id": "n1",
|
|
"type": "RawForward",
|
|
"pos_x": 96,
|
|
"pos_y": 179.25,
|
|
"config": {
|
|
"_origId": "n1",
|
|
"passthrough_headers": true,
|
|
"extra_headers": "{}"
|
|
},
|
|
"in": {}
|
|
},
|
|
{
|
|
"id": "n2",
|
|
"type": "ProviderCall",
|
|
"pos_x": 526,
|
|
"pos_y": 91,
|
|
"config": {
|
|
"provider": "gemini",
|
|
"provider_configs": {
|
|
"openai": {
|
|
"base_url": "https://api.openai.com",
|
|
"endpoint": "/v1/chat/completions",
|
|
"headers": "{\"Authorization\":\"Bearer [[VAR:incoming.headers.authorization]]\"}",
|
|
"template": "{\n \"model\": \"{{ model }}\",\n [[PROMPT]],\n \"temperature\": {{ incoming.json.temperature|default(params.temperature|default(0.7)) }},\n \"top_p\": {{ incoming.json.top_p|default(params.top_p|default(1)) }},\n \"max_tokens\": {{ incoming.json.max_tokens|default(params.max_tokens|default(256)) }},\n \"max_completion_tokens\": {{ incoming.json.max_completion_tokens|default(params.max_tokens|default(256)) }},\n \"presence_penalty\": {{ incoming.json.presence_penalty|default(0) }},\n \"frequency_penalty\": {{ incoming.json.frequency_penalty|default(0) }},\n \"stop\": {{ incoming.json.stop|default(params.stop|default([])) }},\n \"stream\": {{ incoming.json.stream|default(false) }}\n}"
|
|
},
|
|
"gemini": {
|
|
"base_url": "https://generativelanguage.googleapis.com",
|
|
"endpoint": "/v1beta/models/{{ model }}:generateContent?key=[[VAR:incoming.api_keys.key]]",
|
|
"headers": "{}",
|
|
"template": "{\n \"model\": \"{{ model }}\",\n [[PROMPT]],\n \"safetySettings\": {{ incoming.json.safetySettings|default([]) }},\n \"generationConfig\": {\n \"temperature\": {{ incoming.json.generationConfig.temperature|default(params.temperature|default(0.7)) }},\n \"topP\": {{ incoming.json.generationConfig.topP|default(params.top_p|default(1)) }},\n \"maxOutputTokens\": {{ incoming.json.generationConfig.maxOutputTokens|default(params.max_tokens|default(256)) }},\n \"stopSequences\": {{ incoming.json.generationConfig.stopSequences|default(params.stop|default([])) }},\n \"candidateCount\": {{ incoming.json.generationConfig.candidateCount|default(1) }},\n \"thinkingConfig\": {\n \"includeThoughts\": {{ incoming.json.generationConfig.thinkingConfig.includeThoughts|default(false) }},\n \"thinkingBudget\": {{ incoming.json.generationConfig.thinkingConfig.thinkingBudget|default(0) }}\n }\n }\n}"
|
|
},
|
|
"claude": {
|
|
"base_url": "https://api.anthropic.com",
|
|
"endpoint": "/v1/messages",
|
|
"headers": "{\"x-api-key\":\"[[VAR:incoming.headers.x-api-key]]\",\"anthropic-version\":\"2023-06-01\",\"anthropic-beta\":\"[[VAR:incoming.headers.anthropic-beta]]\"}",
|
|
"template": "{\n \"model\": \"{{ model }}\",\n [[PROMPT]],\n \"temperature\": {{ incoming.json.temperature|default(params.temperature|default(0.7)) }},\n \"top_p\": {{ incoming.json.top_p|default(params.top_p|default(1)) }},\n \"max_tokens\": {{ incoming.json.max_tokens|default(params.max_tokens|default(256)) }},\n \"stop_sequences\": {{ incoming.json.stop_sequences|default(params.stop|default([])) }},\n \"stream\": {{ incoming.json.stream|default(false) }},\n \"thinking\": {\n \"type\": \"{{ incoming.json.thinking.type|default('disabled') }}\",\n \"budget_tokens\": {{ incoming.json.thinking.budget_tokens|default(0) }}\n },\n \"anthropic_version\": \"{{ anthropic_version|default('2023-06-01') }}\"\n}"
|
|
}
|
|
},
|
|
"blocks": [
|
|
{
|
|
"id": "bmf9c2u94",
|
|
"name": "TestGemini",
|
|
"role": "system",
|
|
"prompt": "Hey revrite [[OUT1]]",
|
|
"enabled": true,
|
|
"order": 0
|
|
}
|
|
],
|
|
"_origId": "n2"
|
|
},
|
|
"in": {
|
|
"payload": "n1.result"
|
|
}
|
|
}
|
|
]
|
|
} |