mirror of
https://github.com/Pythagora-io/gpt-pilot.git
synced 2026-01-09 13:17:55 -05:00
add jsonref dep
This commit is contained in:
@@ -97,6 +97,8 @@ class AgentConvo(Convo):
|
||||
else:
|
||||
return d
|
||||
|
||||
# We want to make the schema as simple as possible to avoid confusing the LLM,
|
||||
# so we remove (dereference) all the refs we can and show the "final" schema version.
|
||||
schema_txt = json.dumps(remove_defs(jsonref.loads(json.dumps(model.model_json_schema()))))
|
||||
self.user(
|
||||
f"IMPORTANT: Your response MUST conform to this JSON schema:\n```\n{schema_txt}\n```."
|
||||
|
||||
@@ -38,6 +38,7 @@ httpx = "^0.27.0"
|
||||
alembic = "^1.13.1"
|
||||
python-dotenv = "^1.0.1"
|
||||
prompt-toolkit = "^3.0.45"
|
||||
jsonref = "^1.1.0"
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
pytest = "^8.1.1"
|
||||
|
||||
@@ -18,6 +18,7 @@ httpx==0.27.0
|
||||
huggingface-hub==0.23.2
|
||||
idna==3.7
|
||||
jinja2==3.1.4
|
||||
jsonref==1.1.0
|
||||
mako==1.3.5
|
||||
markupsafe==2.1.5
|
||||
openai==1.31.0
|
||||
|
||||
Reference in New Issue
Block a user