Skip to content

Commit

Permalink
Merge pull request #17 from ucbepic/shreyashankar/blockingerr
Browse files Browse the repository at this point in the history
Remove unnecessary name parameter from parallel map operation.
  • Loading branch information
shreyashankar authored Sep 27, 2024
2 parents 6595257 + 3fed847 commit ae5ffe3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
8 changes: 1 addition & 7 deletions docetl/operations/map.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,18 +260,12 @@ def syntax_check(self) -> None:
if not isinstance(prompt_config, dict):
raise TypeError(f"Prompt configuration {i} must be a dictionary")

required_keys = ["name", "prompt", "output_keys"]
required_keys = ["prompt", "output_keys"]
for key in required_keys:
if key not in prompt_config:
raise ValueError(
f"Missing required key '{key}' in prompt configuration {i}"
)

if not isinstance(prompt_config["name"], str):
raise TypeError(
f"'name' in prompt configuration {i} must be a string"
)

if not isinstance(prompt_config["prompt"], str):
raise TypeError(
f"'prompt' in prompt configuration {i} must be a string"
Expand Down
1 change: 0 additions & 1 deletion docs/operators/parallel-map.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ The output schema should include all the fields generated by the individual prom

Each prompt configuration in the `prompts` list should contain:

- `name`: A unique name for the prompt
- `prompt`: The prompt template to use for the transformation
- `output_keys`: List of keys that this prompt will generate
- `model` (optional): The language model to use for this specific prompt
Expand Down
10 changes: 5 additions & 5 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@ nav:
# - User-Defined Functions: advanced/custom-operators.md
# - Extending Optimizer Agents: advanced/extending-agents.md
# - Performance Tuning: advanced/performance-tuning.md
- Examples:
- Reporting on Themes from Presidential Debates: examples/presidential-debate-themes.md
- Mining Product Reviews for Polarizing Features: examples/mining-product-reviews.md
# - Annotating Legal Documents: examples/annotating-legal-documents.md
# - Characterizing Troll Behavior on Wikipedia: examples/characterizing-troll-behavior.md
- API Reference:
- docetl: api-reference/docetl.md
- docetl.cli: api-reference/cli.md
- docetl.operations: api-reference/operations.md
- docetl.optimizers: api-reference/optimizers.md
- Python API: api-reference/python.md
- Examples:
- Reporting on Themes from Presidential Debates: examples/presidential-debate-themes.md
- Mining Product Reviews for Polarizing Features: examples/mining-product-reviews.md
# - Annotating Legal Documents: examples/annotating-legal-documents.md
# - Characterizing Troll Behavior on Wikipedia: examples/characterizing-troll-behavior.md
- Community:
- Community: community/index.md
- Roadmap: community/roadmap.md
Expand Down

0 comments on commit ae5ffe3

Please sign in to comment.