mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-08-06 11:37:44 +00:00
Fix model bug and push (#35)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import re
|
||||
from typing import Sequence
|
||||
from rdagent.oai.llm_utils import APIBackend
|
||||
|
||||
@@ -36,7 +37,8 @@ class ModelTaskGen(TaskGenerator):
|
||||
)
|
||||
|
||||
# Extract the code part from the response
|
||||
code = resp.split("```python")[1].split("```")[0]
|
||||
match = re.search(r".*```[Pp]ython\n(.*)\n```.*", resp, re.DOTALL)
|
||||
code = match.group(1)
|
||||
mti.inject_code(**{"model.py": code})
|
||||
mti_l.append(mti)
|
||||
return mti_l
|
||||
|
||||
Reference in New Issue
Block a user