Skip to content

Commit

Permalink
can run code
Browse files Browse the repository at this point in the history
  • Loading branch information
tcmartin committed Nov 23, 2023
1 parent 243c167 commit 7907cbb
Show file tree
Hide file tree
Showing 15 changed files with 288 additions and 93 deletions.
6 changes: 6 additions & 0 deletions .botignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
docker-compose.yml
.env
.git/
devbot.egg-info/
__pycache__/

Binary file added __pycache__/main.cpython-39.pyc
Binary file not shown.
Binary file added auto_coder/__pycache__/__init__.cpython-39.pyc
Binary file not shown.
Binary file added auto_coder/__pycache__/bot.cpython-39.pyc
Binary file not shown.
Binary file modified auto_coder/__pycache__/main.cpython-39.pyc
Binary file not shown.
333 changes: 249 additions & 84 deletions auto_coder/bot.py

Large diffs are not rendered by default.

16 changes: 7 additions & 9 deletions auto_coder/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import typer
from .bot import bot
from .llms import get_response
#from .llms import get_response
import json

app = typer.Typer()
Expand All @@ -21,19 +21,17 @@ def run():
print(system_message)

# Get response from llms.get_response
bot_response = bot.get_bot_output(system_message)
if DEBUG:
print(bot_response)
json_commands = json.loads(bot_response)
if DEBUG:
print(json_commands)
#json_commands = json.loads(bot_response)
#if DEBUG:
#print(json_commands)

# Execute the commands and store responses
responses = my_bot.interpret_json(json_commands)
responses, commands = my_bot.process_and_interpret_message(system_message)
for response in responses:
print(response)
my_bot.update_recent_messages(response) # Function to update recent messages

for command in commands:
my_bot.update_recent_messages(command)
# Check for heartbeat
if not my_bot.heart_beat:
# Wait for user input
Expand Down
3 changes: 3 additions & 0 deletions devbot.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Metadata-Version: 2.1
Name: devbot
Version: 0.1.0
15 changes: 15 additions & 0 deletions devbot.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
setup.py
auto_coder/__init__.py
auto_coder/__main__.py
auto_coder/bot.py
auto_coder/llms.py
auto_coder/main.py
auto_coder/migrate.py
auto_coder/rein_viate.py
auto_coder/reinstantiate.py
auto_coder/weav_answer.py
devbot.egg-info/PKG-INFO
devbot.egg-info/SOURCES.txt
devbot.egg-info/dependency_links.txt
devbot.egg-info/entry_points.txt
devbot.egg-info/top_level.txt
1 change: 1 addition & 0 deletions devbot.egg-info/dependency_links.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

2 changes: 2 additions & 0 deletions devbot.egg-info/entry_points.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[console_scripts]
devbot = main:app
1 change: 1 addition & 0 deletions devbot.egg-info/top_level.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
auto_coder
1 change: 1 addition & 0 deletions hello_world
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hello world
2 changes: 2 additions & 0 deletions hello_world.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def print_hello_world():
print("hello world!")
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ tiktoken==0.5.1
tenacity==8.2.3
langchain==0.0.339
kor==1.0.0
google-cloud-aiplatform==1.36.4

0 comments on commit 7907cbb

Please sign in to comment.