Skip to content

Commit

Permalink
[gpt_cmd.py] Provide system OS and arch in first message
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdothtml committed May 30, 2024
1 parent 42ea28d commit 9c9f431
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
```sh
gpt_cmd "Install python3 and pip3 and symlink them to python and pip"

gpt_cmd "You're running on an alpine linux distro that already has wget and bash installed. Install kafka"
gpt_cmd "You're running in a container that already has wget and bash installed. Install kafka"

gpt_cmd "Install SQLite and write a script to verify it's working correctly"
```
Expand Down
4 changes: 3 additions & 1 deletion gpt_cmd.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import datetime
import json
import os
import platform
import subprocess
import sys
from openai import OpenAI
Expand Down Expand Up @@ -121,9 +122,10 @@ def prompt_user_yn(prompt):
def main(goal):
convo_timestamp = datetime.datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
convo_file_name = None
system_info=f'System info:\nOS: {sys.platform}\nArchitecture: {platform.machine()}'
messages = [
{"role": "system", "content": SYSTEM_PROMPT},
{"role": "user", "content": goal}
{"role": "user", "content": f'{goal}\n{system_info}'}
]

def save_convo():
Expand Down

0 comments on commit 9c9f431

Please sign in to comment.