Skip to content

Commit

Permalink
tools 6
Browse files Browse the repository at this point in the history
  • Loading branch information
samshapley committed Aug 31, 2023
1 parent 534b899 commit ffd7b11
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,9 @@ default_presence_penalty: 0
### Logging ###
wandb_enabled: false

### Tools ###
tools_enabled: true
active_tools:
- 'generate_image'

working_codebase_dirname: 'generated_code' # A folder that exists
11 changes: 11 additions & 0 deletions helpers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import yaml
import matplotlib.pyplot as plt

# Load the configuration
with open('config.yml', 'r') as f:
config = yaml.safe_load(f)

tools_enabled = config['tools_enabled']

def load_pipeline(file_path):
"""Load a pipeline configuration from a YAML file."""
print("\033[93mLoading pipeline...\033[00m")
Expand All @@ -13,6 +19,11 @@ def load_system_prompt(module_name):
with open('general_system.txt', 'r') as file:
system_prompt = file.read().replace('\n', '')

if tools_enabled:
with open(f'tools/tool_prompt.txt', 'r') as file:
tool_prompt = file.read().replace('\n', '')
system_prompt += '\n\n' + tool_prompt + '\n'

with open(f'system_prompts/{module_name}.txt', 'r') as file:
module_prompt = file.read().replace('\n', '')

Expand Down

0 comments on commit ffd7b11

Please sign in to comment.