Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

Remove hardcoding of gpt-3.5-turbo in favor of config

Taylor Brown744c5fa25ba2
diff --git a/scripts/browse.py b/scripts/browse.py
index 33911f2065..178bb58ad8 100644
--- a/scripts/browse.py
+++ b/scripts/browse.py
@@ -3,7 +3,9 @@ import requests
from bs4 import BeautifulSoup
from readability import Document
import openai
+from config import Config
+cfg = Config()
def scrape_text(url):
response = requests.get(url)
@@ -100,7 +102,7 @@ def summarize_text(text, is_website=True):
]
response = openai.ChatCompletion.create(
- model="gpt-3.5-turbo",
+ model=cfg.fast_llm_model,
messages=messages,
max_tokens=300,
)
@@ -128,7 +130,7 @@ def summarize_text(text, is_website=True):
]
response = openai.ChatCompletion.create(
- model="gpt-3.5-turbo",
+ model=cfg.fast_llm_model,
messages=messages,
max_tokens=300,
)
diff --git a/scripts/commands.py b/scripts/commands.py
index 37cbdcd14e..ff65f1a169 100644
--- a/scripts/commands.py
+++ b/scripts/commands.py
@@ -164,7 +164,7 @@ def shutdown():
quit()
-def start_agent(name, task, prompt, model="gpt-3.5-turbo"):
+def start_agent(name, task, prompt, model=cfg.fast_llm_model):
global cfg
# Remove underscores from name