Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions main_cascade.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

from worker import AgentPhD

import tiktoken
MAX_TOKENS = 127900
encoding = tiktoken.encoding_for_model("gpt-4o")

## baseline
system = "You are an efficient and insightful assistant to a molecular biologist."
Expand Down Expand Up @@ -120,6 +123,10 @@ def GeneAgent(ID, genes):
pattern = re.compile(r'^[a-zA-Z0-9,.;?!*()_-]+$')
## send genes to GPT-4 and generate the original template of process name and analysis
try:
# Ensure output directories exist
os.makedirs("Outputs/GPT-4", exist_ok=True)
os.makedirs("Outputs/GeneAgent/Cascade", exist_ok=True)
os.makedirs("Verification Reports/Cascade", exist_ok=True)
prompt_baseline = baseline(genes)
first_step = prompt_baseline + system
token_baseline = encoding.encode(first_step)
Expand Down