|
1 | 1 | from core.agents.base import BaseAgent
|
2 | 2 | from core.agents.convo import AgentConvo
|
3 | 3 | from core.agents.response import AgentResponse, ResponseType
|
| 4 | +from core.config import SPEC_WRITER_AGENT_NAME |
4 | 5 | from core.db.models import Complexity
|
5 | 6 | from core.db.models.project_state import IterationStatus
|
6 | 7 | from core.llm.parser import StringParser
|
@@ -95,7 +96,7 @@ async def update_spec(self, iteration_mode) -> AgentResponse:
|
95 | 96 | await self.send_message(
|
96 | 97 | f"Making the following changes to project specification:\n\n{feature_description}\n\nUpdated project specification:"
|
97 | 98 | )
|
98 |
| - llm = self.get_llm() |
| 99 | + llm = self.get_llm(SPEC_WRITER_AGENT_NAME) |
99 | 100 | convo = AgentConvo(self).template("add_new_feature", feature_description=feature_description)
|
100 | 101 | llm_response: str = await llm(convo, temperature=0, parser=StringParser())
|
101 | 102 | updated_spec = llm_response.strip()
|
@@ -124,7 +125,7 @@ async def update_spec(self, iteration_mode) -> AgentResponse:
|
124 | 125 |
|
125 | 126 | async def check_prompt_complexity(self, prompt: str) -> str:
|
126 | 127 | await self.send_message("Checking the complexity of the prompt ...")
|
127 |
| - llm = self.get_llm() |
| 128 | + llm = self.get_llm(SPEC_WRITER_AGENT_NAME) |
128 | 129 | convo = AgentConvo(self).template("prompt_complexity", prompt=prompt)
|
129 | 130 | llm_response: str = await llm(convo, temperature=0, parser=StringParser())
|
130 | 131 | return llm_response.lower()
|
@@ -154,7 +155,7 @@ async def analyze_spec(self, spec: str) -> str:
|
154 | 155 | )
|
155 | 156 | await self.send_message(msg)
|
156 | 157 |
|
157 |
| - llm = self.get_llm() |
| 158 | + llm = self.get_llm(SPEC_WRITER_AGENT_NAME) |
158 | 159 | convo = AgentConvo(self).template("ask_questions").user(spec)
|
159 | 160 | n_questions = 0
|
160 | 161 | n_answers = 0
|
@@ -204,7 +205,7 @@ async def analyze_spec(self, spec: str) -> str:
|
204 | 205 |
|
205 | 206 | async def review_spec(self, spec: str) -> str:
|
206 | 207 | convo = AgentConvo(self).template("review_spec", spec=spec)
|
207 |
| - llm = self.get_llm() |
| 208 | + llm = self.get_llm(SPEC_WRITER_AGENT_NAME) |
208 | 209 | llm_response: str = await llm(convo, temperature=0)
|
209 | 210 | additional_info = llm_response.strip()
|
210 | 211 | if additional_info and len(additional_info) > 6:
|
|
0 commit comments