-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
31a4301
commit f5ffb5f
Showing
33 changed files
with
301 additions
and
490 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
TypedBuildCoreComponentsPrompt: | ||
classes: | ||
- TypedPrompt | ||
- Chat | ||
description: Develop core components of the DSL. | ||
error_handling: Exception Handling | ||
methods: | ||
- execute | ||
- validate | ||
parsers: | ||
- YAML Parser | ||
- JSON Parser | ||
performance_metrics: | ||
- Speed | ||
- Memory | ||
source: Develop parsers {{ parsers }} for the YAML configurations. Implement classes | ||
{{ classes }} and methods {{ methods }} for functionalities. Include {{ error_handling | ||
}} and consider {{ performance_metrics }}. | ||
title: Build Core Components | ||
TypedDeploymentPrompt: | ||
backup_plan: Daily Backups | ||
ci_cd_pipelines: | ||
- Jenkins | ||
- GitLab | ||
deployment_strategy: Blue-Green | ||
description: Deploy the system. | ||
monitoring_tools: | ||
- Prometheus | ||
- Grafana | ||
rollback_procedures: | ||
- Automated | ||
- Manual | ||
source: Choose an appropriate deployment strategy {{ deployment_strategy }}. Implement | ||
CI/CD pipelines {{ ci_cd_pipelines }}, use monitoring tools {{ monitoring_tools | ||
}}, have a backup plan {{ backup_plan }}, and prepare rollback procedures {{ rollback_procedures | ||
}}. | ||
title: Deployment | ||
TypedDesignArchitecturePrompt: | ||
components: | ||
- Parser | ||
- Executor | ||
description: Design the DSL architecture. | ||
interactions: | ||
- Data Flow | ||
- Control Flow | ||
modularity: Modular | ||
scalability: High | ||
source: Plan how the DSL will interact with other system components {{ components | ||
}}. Define the DSL's syntax {{ syntax }}, ensure {{ scalability }} and {{ modularity | ||
}}, and outline component interactions {{ interactions }}. | ||
syntax: YAML-based | ||
title: Design Architecture | ||
TypedDocumentationPrompt: | ||
api_docs: | ||
- Endpoints | ||
- Examples | ||
description: Create detailed documentation. | ||
documentation_types: | ||
- API | ||
- User Guide | ||
faqs: | ||
- General | ||
- Technical | ||
source: Create detailed documentation types {{ documentation_types }} and offer | ||
training sessions or materials to end-users including user guides {{ user_guides | ||
}}, API documentation {{ api_docs }}, tutorials {{ tutorials }}, and FAQs {{ faqs | ||
}}. | ||
title: Documentation | ||
tutorials: | ||
- Video | ||
- Text | ||
user_guides: | ||
- Getting Started | ||
- Advanced | ||
TypedImplementBusinessLogicPrompt: | ||
algorithms: | ||
- NLP | ||
- ML | ||
data_models: | ||
- User | ||
- Environment | ||
description: Implement the business logic. | ||
goal_setting: S.M.A.R.T | ||
optimization_criteria: | ||
- Efficiency | ||
- Accuracy | ||
source: Add logic for team composition {{ team_composition }}, goal setting {{ goal_setting | ||
}}, use data models {{ data_models }}, apply algorithms {{ algorithms }}, and | ||
meet optimization criteria {{ optimization_criteria }}. | ||
team_composition: Cross-functional | ||
title: Implement Business Logic | ||
TypedMaintenancePrompt: | ||
description: Maintain and update the system. | ||
monitoring_metrics: | ||
- CPU Usage | ||
- Error Rate | ||
patching_policy: Security First | ||
source: Monitor system's usage and performance using metrics {{ monitoring_metrics | ||
}}. Apply patches and updates as required following the update schedule {{ update_schedule | ||
}} and patching policy {{ patching_policy }}. Provide support through channels | ||
{{ support_channels }} and collect feedback via {{ user_feedback_mechanisms }}. | ||
support_channels: | ||
- Chat | ||
title: Maintenance | ||
update_schedule: Monthly | ||
user_feedback_mechanisms: | ||
- Survey | ||
- Reviews | ||
TypedRequirementAnalysisPrompt: | ||
constraints: | ||
- Time | ||
- Budget | ||
core_functionalities: | ||
- Parsing | ||
- Error Handling | ||
description: Gather detailed requirements for the DSL. | ||
source: Gather detailed requirements that the DSL needs to fulfill. Identify core | ||
functionalities, consult with {{ stakeholders }}, consider {{ constraints }}, | ||
choose appropriate {{ technologies }}, within the timeframe of {{ timeframe }}. | ||
stakeholders: | ||
- Product Manager | ||
- Dev Team | ||
- QA Team | ||
technologies: | ||
- Python | ||
- YAML | ||
timeframe: Q1 | ||
title: Requirement Analysis | ||
TypedTestingPrompt: | ||
description: Conduct thorough testing. | ||
integration_tests: | ||
- test_end_to_end | ||
source: Write unit tests {{ unit_tests }}, validate through integration tests {{ | ||
integration_tests }}, perform stress tests {{ stress_tests }}, use test data {{ | ||
test_data }} in various test environments {{ test_environments }}. | ||
stress_tests: | ||
- test_load | ||
test_data: | ||
- Sample YAML | ||
- Sample JSON | ||
test_environments: | ||
- Local | ||
- Staging | ||
title: Testing | ||
unit_tests: | ||
- test_parser | ||
- test_executor |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,11 +4,11 @@ build-backend = "poetry.core.masonry.api" | |
|
||
[tool.poetry] # https://python-poetry.org/docs/pyproject/ | ||
name = "dspygen" | ||
version = "2024.2.25" | ||
version = "2024.2.25.2" | ||
description = "A Ruby on Rails style framework for the DSPy (Demonstrate, Search, Predict) project for Language Models like GPT, BERT, and LLama." | ||
authors = ["Sean Chatman <[email protected]>"] | ||
readme = "README.md" | ||
repository = "https://github.com/user/my-package" | ||
repository = "https://github.com/seanchatmangpt/dspygen" | ||
|
||
[tool.poetry.scripts] # https://python-poetry.org/docs/pyproject/#scripts | ||
dspygen = "dspygen.cli:app" | ||
|
@@ -33,6 +33,7 @@ openai = "^1.12.0" | |
pyperclip = "^1.8.2" | ||
asyncer = "^0.0.5" | ||
loguru = "^0.7.2" | ||
groq = "^0.4.1" | ||
|
||
[tool.poetry.group.test.dependencies] # https://python-poetry.org/docs/master/managing-dependencies/ | ||
coverage = { extras = ["toml"], version = ">=7.2.5" } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import inspect | ||
from functools import partial, wraps | ||
|
||
import asyncer | ||
from typer import Typer | ||
|
||
|
||
class AsyncTyper(Typer): | ||
@staticmethod | ||
def maybe_run_async(decorator, f): | ||
if inspect.iscoroutinefunction(f): | ||
|
||
@wraps(f) | ||
def runner(*args, **kwargs): | ||
return asyncer.runnify(f)(*args, **kwargs) | ||
|
||
decorator(runner) | ||
else: | ||
decorator(f) | ||
return f | ||
|
||
def callback(self, *args, **kwargs): | ||
decorator = super().callback(*args, **kwargs) | ||
return partial(self.maybe_run_async, decorator) | ||
|
||
def command(self, *args, **kwargs): | ||
decorator = super().command(*args, **kwargs) | ||
return partial(self.maybe_run_async, decorator) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"""dspygen package.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...typetemp/environment/typed_environment.py → ...typetemp/environment/typed_environment.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...p/environment/typed_native_environment.py → ...p/environment/typed_native_environment.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
src/typetemp/functional.py → src/dspygen/typetemp/functional.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.