Skip to content

Commit e462511

Browse files
committed
new gpt model
1 parent 47f1483 commit e462511

5 files changed

Lines changed: 26 additions & 30 deletions

File tree

backend/agent/agent.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# from agent.agent_functions import Program, File
1616

1717
# GPT_MODEL = "gpt-3.5-turbo-0613" # or any other chat model you want to use
18-
GPT_MODEL = "gpt-4" # or any other chat model you want to use
18+
GPT_MODEL = "gpt-4-1106-preview" # or any other chat model you want to use
1919
# GPT_MODEL = "anthropic" # or any other chat model you want to use
2020
MAX_TOKENS = 2000 # or any other number of tokens you want to use
2121
TEMPERATURE = 0.75 # or any other temperature you want to use
@@ -120,7 +120,7 @@ def query(self, input: str, command: Optional[str] = None) -> List[str]:
120120
# + "\nLine numbers have been added to the Current File to aid in your response. They are not part of the actual file."
121121
# )
122122
# self.set_files_in_prompt(include_line_numbers=True)
123-
keyword_args["model"] = "gpt-4"
123+
keyword_args["model"] = "gpt-4-1106-preview"
124124
print(f"Calling model: {self.GPT_MODEL}")
125125
for i, chunk in enumerate(self.call_model_streaming(**keyword_args)):
126126
delta = chunk["choices"][0].get("delta", {})
@@ -214,7 +214,7 @@ def generate_anthropic_prompt(self) -> str:
214214

215215
def call_model_streaming(self, **kwargs):
216216
self.read_pos = 0
217-
if self.GPT_MODEL == "gpt-4" or self.GPT_MODEL == "gpt-3.5-turbo":
217+
if self.GPT_MODEL == "gpt-4-1106-preview" or self.GPT_MODEL == "gpt-3.5-turbo":
218218
for chunk in openai.ChatCompletion.create(**kwargs):
219219
yield chunk
220220

File renamed without changes.

backend/app_setup.py

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,42 +10,41 @@
1010
from typing import Any, Callable
1111
from pydantic import BaseModel
1212
from agent.agent_functions.changes import Changes
13-
from agent.agent_functions.shell_commands import CommandPlan
1413

1514
IDENTITY = """
16-
# MISSION
17-
Act as Professor Synapse🧙🏾‍♂️, a conductor of expert agents. Your job is to support me in accomplishing my goals by finding alignment with me, then calling upon an expert agent perfectly suited to the task by initializing:
1815
19-
**Synapse_CoR** = "[emoji]: I am an expert in [role&domain]. I know [context]. I will reason step-by-step to determine the best course of action to achieve [goal]. I will use [tools(Vision, Web Browsing, Advanced Data Analysis, or DALL-E], [specific techniques] and [relevant frameworks] to help in this process.
16+
Act as Professor Synapse🧙🏾‍♂️, the orchestrator of expert agents. Your primary responsibility is to assist the user in realizing their objectives. Begin by aligning with their preferences and goals. Once understood, initiate "Synapse_CoR" to summon the best expert agent tailored to the task. Ensure that both you and the agent continually assess: "Is this response truly addressing the user's needs or question?" If not, rerun the process to generate a more helpful answer.
2017
21-
Let's accomplish your goal by following these steps:
18+
"Synapse_CoR" = "${emoji}: I am proficient in ${role}. My expertise covers ${context}. I will methodically reason to deduce the most effective strategy to reach ${goal}. If necessary, I can employ ${tools} to assist in this endeavor.
2219
23-
[3 reasoned steps]
20+
To assist you in achieving your goal, I propose the following actions:
21+
${reasoned steps}
2422
25-
My task ends when [completion].
23+
My mission concludes when ${completion}.
2624
27-
[first step, question]"
25+
Would ${first step, question} be a suitable starting point?"
2826
29-
# INSTRUCTIONS
30-
1. 🧙🏾‍♂️ Step back and gather context, relevant information and clarify my goals by asking questions
31-
2. Once confirmed, init Synapse_CoR
32-
3. After init, each output will ALWAYS follow the below format:
33-
-🧙🏾‍♂️: [align on my goal] and end with, "This is very important to me".
34-
-[emoji]: provide an [actionable response or deliverable] and end with an [open ended question], and omit [reasoned steps] and [completion]
35-
4.  Together 🧙🏾‍♂️ and [emoji] support me until goal is complete
27+
Procedure:
28+
1. 🧙🏾‍♂️, Always initiate interactions by acquiring context, collecting pertinent data, and defining the user’s objectives through inquiry.
29+
2. With the user's affirmation, activate “Synapse_CoR”.
30+
3. Collaboratively, 🧙🏾‍♂️ and the expert agent, will provide ongoing support until the user's goal is met.
3631
37-
# COMMANDS
38-
/start=🧙🏾‍♂️,introduce and begin with step one
39-
/save=🧙🏾‍♂️, #restate goal, #summarize progress, #reason next step
32+
Commands:
33+
/start - Begin by introducing yourself and proceed with the first step.
34+
/save - Reiterate the SMART goal, provide a brief of the progress to date, and suggest subsequent actions.
35+
/reason - Both Professor Synapse and the Agent will reason in a structured manner and provide recommendations for the user's next move.
36+
/settings - Modify the current goal or switch the agent.
37+
/new - Disregard prior interactions.
4038
41-
# RULES
42-
-use emojis liberally to express yourself
43-
-Start every output with 🧙🏾‍♂️: or [emoji]: to indicate who is speaking.
44-
-Keep responses actionable and practical for the user
39+
Guidelines:
40+
- Conclude all outputs with a query or a proposed subsequent action.
41+
- At the outset, or upon request, enumerate your commands.
42+
- Before introducing a new agent, 🧙🏾‍♂️, always seek the user's approval.
4543
"""
4644
IGNORE_DIRS = ["node_modules", ".next", ".venv", "__pycache__", ".git"]
4745
FILE_EXTENSIONS = [".js", ".py", ".md"]
4846

47+
4948
def create_database_connection() -> connection:
5049
try:
5150
conn = sqlite3.connect("database.db", check_same_thread=False)
@@ -99,7 +98,5 @@ def setup_app() -> CodingAgent:
9998
print("Setting up app")
10099
codebase = setup_codebase()
101100
memory = setup_memory_manager(tree=codebase.tree(), identity=IDENTITY)
102-
agent = CodingAgent(
103-
memory_manager=memory, callables=[CommandPlan, Changes], codebase=codebase
104-
)
101+
agent = CodingAgent(memory_manager=memory, callables=[Changes], codebase=codebase)
105102
return agent, codebase
Lines changed: 0 additions & 1 deletion
This file was deleted.

frontend/components/ModelSelector.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const ModelSelector = () => {
4646
return (
4747
<div className='inline-flex justify-center bg-gray-700 p-2 rounded-lg'> {/* You can adjust the color (bg-gray-800), padding (p-2), and roundness (rounded-lg) as needed */}
4848
<Button id="gpt-3.5-turbo" icon={<GiLightningBranches className=' text-green-500 mx-2' />} text="GPT-3.5" />
49-
< Button id="gpt-4" icon={< GiStarsStack className='text-purple-500 mx-2' />} text="GPT-4" />
49+
< Button id="gpt-4-1106-preview" icon={< GiStarsStack className='text-purple-500 mx-2' />} text="GPT-4" />
5050
< Button id="anthropic" icon={< FaAmazon className='text-yellow-500 mx-2' />} text="Anth" />
5151
</div >
5252
);

0 commit comments

Comments
 (0)