Spaces:
Sleeping
Sleeping
Cyber Catalyst Team commited on
Commit ·
5a9cfc8
1
Parent(s): 8892f96
feat: increase max_tokens to 1024 for planning cycles to prevent JSON truncation
Browse files- backend.py +4 -4
backend.py
CHANGED
|
@@ -1983,7 +1983,7 @@ async def execute_build_cycle(project_name: str, goal: str):
|
|
| 1983 |
res = await nim_client.chat.completions.create(
|
| 1984 |
model=RECOMMENDED_MODEL,
|
| 1985 |
messages=[{"role": "user", "content": plan_prompt}],
|
| 1986 |
-
max_tokens=
|
| 1987 |
)
|
| 1988 |
raw = res.choices[0].message.content.strip()
|
| 1989 |
except Exception as e:
|
|
@@ -1993,7 +1993,7 @@ async def execute_build_cycle(project_name: str, goal: str):
|
|
| 1993 |
res = await mistral_client.chat.completions.create(
|
| 1994 |
model="mistral-large-latest",
|
| 1995 |
messages=[{"role": "user", "content": plan_prompt}],
|
| 1996 |
-
max_tokens=
|
| 1997 |
)
|
| 1998 |
raw = res.choices[0].message.content.strip()
|
| 1999 |
else:
|
|
@@ -2119,7 +2119,7 @@ async def execute_eternity_cycle(project_name: str, goal: str):
|
|
| 2119 |
res = await nim_client.chat.completions.create(
|
| 2120 |
model=RECOMMENDED_MODEL,
|
| 2121 |
messages=[{"role": "user", "content": plan_prompt}],
|
| 2122 |
-
max_tokens=
|
| 2123 |
)
|
| 2124 |
raw = res.choices[0].message.content.strip()
|
| 2125 |
except Exception as e:
|
|
@@ -2129,7 +2129,7 @@ async def execute_eternity_cycle(project_name: str, goal: str):
|
|
| 2129 |
res = await mistral_client.chat.completions.create(
|
| 2130 |
model="mistral-large-latest",
|
| 2131 |
messages=[{"role": "user", "content": plan_prompt}],
|
| 2132 |
-
max_tokens=
|
| 2133 |
)
|
| 2134 |
raw = res.choices[0].message.content.strip()
|
| 2135 |
else:
|
|
|
|
| 1983 |
res = await nim_client.chat.completions.create(
|
| 1984 |
model=RECOMMENDED_MODEL,
|
| 1985 |
messages=[{"role": "user", "content": plan_prompt}],
|
| 1986 |
+
max_tokens=1024
|
| 1987 |
)
|
| 1988 |
raw = res.choices[0].message.content.strip()
|
| 1989 |
except Exception as e:
|
|
|
|
| 1993 |
res = await mistral_client.chat.completions.create(
|
| 1994 |
model="mistral-large-latest",
|
| 1995 |
messages=[{"role": "user", "content": plan_prompt}],
|
| 1996 |
+
max_tokens=1024
|
| 1997 |
)
|
| 1998 |
raw = res.choices[0].message.content.strip()
|
| 1999 |
else:
|
|
|
|
| 2119 |
res = await nim_client.chat.completions.create(
|
| 2120 |
model=RECOMMENDED_MODEL,
|
| 2121 |
messages=[{"role": "user", "content": plan_prompt}],
|
| 2122 |
+
max_tokens=1024
|
| 2123 |
)
|
| 2124 |
raw = res.choices[0].message.content.strip()
|
| 2125 |
except Exception as e:
|
|
|
|
| 2129 |
res = await mistral_client.chat.completions.create(
|
| 2130 |
model="mistral-large-latest",
|
| 2131 |
messages=[{"role": "user", "content": plan_prompt}],
|
| 2132 |
+
max_tokens=1024
|
| 2133 |
)
|
| 2134 |
raw = res.choices[0].message.content.strip()
|
| 2135 |
else:
|