Skip to content

Commit

Permalink
Chat output file logging
Browse files Browse the repository at this point in the history
  • Loading branch information
amadad committed Oct 3, 2023
1 parent dd08fee commit 04402a8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
*workspace
OAI_CONFIG_LIST
*workspace
.DS_Store
.DS_Store
logs/*
11 changes: 8 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import autogen
import time
from autogen import AssistantAgent, UserProxyAgent, config_list_from_json
#from research import search, scrape_website
import logging
import os

# Import from research.py
from research import search, scrape_website
autogen.ChatCompletion.start_logging()

# Prompt the user for input
user_task = input("Please enter the task for the new client's campaign brief: ")
Expand Down Expand Up @@ -141,4 +143,7 @@
message=f"""
{user_task}
""",
)
)

with open('logs/output.md', 'w') as f:
f.write(str(autogen.ChatCompletion.logged_history))

0 comments on commit 04402a8

Please sign in to comment.