Skip to content

Commit e12f947

Browse files
authored
Merge pull request #1 from Pipelex/feature/Backend-kick-off
Feature/backend kick off
2 parents 33e877d + 2721c90 commit e12f947

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+5374
-2
lines changed

backend/.cursor/rules/run_pipelex.mdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ from pipelex.pipelex import Pipelex
4545
from pipelex.pipeline.execute import execute_pipeline
4646
from pipelex.core.stuffs.image_content import ImageContent
4747

48-
from my_project.gantt.gantt_struct import GanttChart
48+
from lesson_forge.gantt.gantt_struct import GanttChart
4949

5050
SAMPLE_NAME = "extract_gantt"
5151
IMAGE_URL = "assets/gantt/gantt_tree_house.png"

backend/.cursor/rules/write_pipelex.mdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ class Invoice(StructuredContent):
179179
return v
180180
```
181181

182-
**Location:** Create models in `my_project/some_domain/some_domain_struct.py`. Classes inheriting from `StructuredContent` are automatically discovered.
182+
**Location:** Create models in `lesson_forge/some_domain/some_domain_struct.py`. Classes inheriting from `StructuredContent` are automatically discovered.
183183

184184
### Decision Rules for Agents
185185

backend/.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PIPELEX_INFERENCE_API_KEY=

backend/.gitignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
2+
# env
3+
.env
4+
5+
# venv
6+
.venv
7+
venv/
8+
9+
# reports
10+
reports/
11+
12+
# pycache
13+
__pycache__
14+
15+
# Python build artifacts
16+
build/*
17+
*.egg-info/
18+
dist/
19+
*.pyc
20+
21+
# mypy
22+
.mypy_cache/
23+
24+
# Ruff
25+
.ruff_cache/
26+
27+
# Results
28+
results/
29+
30+
# temps
31+
temp/
32+
pipelex_super.toml
33+
base_llm_deck.toml
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
[pipelex_inference]
2+
endpoint = "https://inference.pipelex.com/v1"
3+
api_key = "${PIPELEX_INFERENCE_API_KEY}"
4+
5+
[azure_openai]
6+
enabled = false
7+
endpoint = "${AZURE_API_BASE}"
8+
api_key = "${AZURE_API_KEY}"
9+
api_version = "${AZURE_API_VERSION}"
10+
11+
[bedrock]
12+
enabled = false
13+
aws_region = "${AWS_REGION}"
14+
15+
[google]
16+
enabled = false
17+
api_key = "${GOOGLE_API_KEY}"
18+
19+
[vertexai]
20+
enabled = false
21+
gcp_project_id = "${GCP_PROJECT_ID}"
22+
gcp_location = "${GCP_LOCATION}"
23+
gcp_credentials_file_path = "${GCP_CREDENTIALS_FILE_PATH}"
24+
25+
[openai]
26+
enabled = false
27+
api_key = "${OPENAI_API_KEY}"
28+
29+
[anthropic]
30+
enabled = false
31+
api_key = "${ANTHROPIC_API_KEY}"
32+
claude_4_tokens_limit = 8192
33+
34+
[mistral]
35+
enabled = false
36+
api_key = "${MISTRAL_API_KEY}"
37+
38+
[xai]
39+
enabled = false
40+
endpoint = "https://api.x.ai/v1"
41+
api_key = "${XAI_API_KEY}"
42+
43+
[ollama]
44+
enabled = false
45+
endpoint = "http://localhost:11434/v1"
46+
47+
[blackboxai]
48+
enabled = false
49+
endpoint = "https://api.blackbox.ai/v1"
50+
api_key = "${BLACKBOX_API_KEY}"
51+
52+
[fal]
53+
enabled = false
54+
api_key = "${FAL_API_KEY}"
55+
56+
[internal] # software-only backend, runs internally, without AI
57+
enabled = true
58+
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
################################################################################
2+
# Anthropic Backend Configuration
3+
################################################################################
4+
#
5+
# This file defines the model specifications for Anthropic Claude models.
6+
# It contains model definitions for various Claude language models
7+
# accessible through the Anthropic API.
8+
#
9+
# Configuration structure:
10+
# - Each model is defined in its own section with the model name as the header
11+
# - Headers with dots must be quoted (e.g., ["claude-3.5-sonnet"])
12+
# - Model costs are in USD per million tokens (input/output)
13+
#
14+
################################################################################
15+
16+
################################################################################
17+
# MODEL DEFAULTS
18+
################################################################################
19+
20+
[defaults]
21+
model_type = "llm"
22+
sdk = "anthropic"
23+
prompting_target = "anthropic"
24+
25+
################################################################################
26+
# LANGUAGE MODELS
27+
################################################################################
28+
29+
# --- Claude 3 Series ----------------------------------------------------------
30+
[claude-3-haiku]
31+
model_id = "claude-3-haiku-20240307"
32+
max_tokens = 4096
33+
inputs = ["text", "images"]
34+
outputs = ["text", "structured"]
35+
max_prompt_images = 100
36+
costs = { input = 0.25, output = 1.25 }
37+
38+
[claude-3-opus]
39+
model_id = "claude-3-opus-20240229"
40+
max_tokens = 4096
41+
inputs = ["text", "images"]
42+
outputs = ["text", "structured"]
43+
max_prompt_images = 100
44+
costs = { input = 15.0, output = 75.0 }
45+
46+
# --- Claude 3.7 Series --------------------------------------------------------
47+
["claude-3.7-sonnet"]
48+
model_id = "claude-3-7-sonnet-20250219"
49+
max_tokens = 8192
50+
inputs = ["text", "images"]
51+
outputs = ["text", "structured"]
52+
max_prompt_images = 100
53+
costs = { input = 3.0, output = 15.0 }
54+
55+
# --- Claude 4 Series ----------------------------------------------------------
56+
[claude-4-sonnet]
57+
model_id = "claude-sonnet-4-20250514"
58+
max_tokens = 64000
59+
inputs = ["text", "images"]
60+
outputs = ["text", "structured"]
61+
max_prompt_images = 100
62+
costs = { input = 3.0, output = 15.0 }
63+
64+
[claude-4-opus]
65+
model_id = "claude-opus-4-20250514"
66+
max_tokens = 32000
67+
inputs = ["text", "images"]
68+
outputs = ["text", "structured"]
69+
max_prompt_images = 100
70+
costs = { input = 3.0, output = 15.0 }
71+
72+
# --- Claude 4.1 Series --------------------------------------------------------
73+
["claude-4.1-opus"]
74+
model_id = "claude-opus-4-1-20250805"
75+
max_tokens = 32000
76+
inputs = ["text", "images"]
77+
outputs = ["text", "structured"]
78+
max_prompt_images = 100
79+
costs = { input = 3.0, output = 15.0 }
80+
81+
# --- Claude 4.5 Series --------------------------------------------------------
82+
["claude-4.5-sonnet"]
83+
model_id = "claude-sonnet-4-5-20250929"
84+
max_tokens = 64000
85+
inputs = ["text", "images"]
86+
outputs = ["text", "structured"]
87+
max_prompt_images = 100
88+
costs = { input = 3.0, output = 15.0 }
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
################################################################################
2+
# Azure OpenAI Backend Configuration
3+
################################################################################
4+
#
5+
# This file defines the model specifications for Azure OpenAI models.
6+
# It contains model definitions for OpenAI models deployed on Azure
7+
# accessible through the Azure OpenAI API.
8+
#
9+
# Configuration structure:
10+
# - Each model is defined in its own section with the model name as the header
11+
# - Headers with dots must be quoted (e.g., ["gpt-4.1"])
12+
# - Model costs are in USD per million tokens (input/output)
13+
#
14+
################################################################################
15+
16+
################################################################################
17+
# MODEL DEFAULTS
18+
################################################################################
19+
20+
[defaults]
21+
model_type = "llm"
22+
sdk = "azure_openai"
23+
prompting_target = "openai"
24+
25+
################################################################################
26+
# LANGUAGE MODELS
27+
################################################################################
28+
29+
# --- GPT-4o Series ------------------------------------------------------------
30+
[gpt-4o]
31+
model_id = "gpt-4o-2024-11-20"
32+
inputs = ["text", "images"]
33+
outputs = ["text", "structured"]
34+
costs = { input = 2.5, output = 10.0 }
35+
36+
[gpt-4o-mini]
37+
model_id = "gpt-4o-mini-2024-07-18"
38+
inputs = ["text", "images"]
39+
outputs = ["text", "structured"]
40+
costs = { input = 0.15, output = 0.6 }
41+
42+
# --- GPT-4.1 Series -----------------------------------------------------------
43+
["gpt-4.1"]
44+
model_id = "gpt-4.1-2025-04-14"
45+
inputs = ["text", "images"]
46+
outputs = ["text", "structured"]
47+
costs = { input = 2, output = 8 }
48+
49+
["gpt-4.1-mini"]
50+
model_id = "gpt-4.1-mini-2025-04-14"
51+
inputs = ["text", "images"]
52+
outputs = ["text", "structured"]
53+
costs = { input = 0.4, output = 1.6 }
54+
55+
["gpt-4.1-nano"]
56+
model_id = "gpt-4.1-nano-2025-04-14"
57+
inputs = ["text", "images"]
58+
outputs = ["text", "structured"]
59+
costs = { input = 0.1, output = 0.4 }
60+
61+
# --- o Series ----------------------------------------------------------------
62+
[o1-mini]
63+
model_id = "o1-mini-2024-09-12"
64+
inputs = ["text"]
65+
outputs = ["text", "structured"]
66+
costs = { input = 3.0, output = 12.0 }
67+
68+
[o1]
69+
model_id = "o1-2024-12-17"
70+
inputs = ["text", "images"]
71+
outputs = ["text", "structured"]
72+
costs = { input = 15.0, output = 60.0 }
73+
74+
[o3-mini]
75+
model_id = "o3-mini-2025-01-31"
76+
inputs = ["text"]
77+
outputs = ["text", "structured"]
78+
costs = { input = 1.1, output = 4.4 }
79+
80+
# --- GPT-5 Series -------------------------------------------------------------
81+
[gpt-5-mini]
82+
model_id = "gpt-5-mini-2025-08-07"
83+
inputs = ["text", "images"]
84+
outputs = ["text", "structured"]
85+
costs = { input = 0.25, output = 2.0 }
86+
87+
[gpt-5-nano]
88+
model_id = "gpt-5-nano-2025-08-07"
89+
inputs = ["text", "images"]
90+
outputs = ["text", "structured"]
91+
costs = { input = 0.05, output = 0.4 }
92+
93+
[gpt-5-chat]
94+
model_id = "gpt-5-chat-2025-08-07"
95+
inputs = ["text", "images"]
96+
outputs = ["text", "structured"]
97+
costs = { input = 1.25, output = 10.0 }
98+

0 commit comments

Comments
 (0)