Fix the bug that the agent could not find the context (#3795)

### What problem does this PR solve?

Fix the bug that the agent could not find the context
#3682
### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

Co-authored-by: liuhua <10215101452@stu.ecun.edu.cn>
This commit is contained in:
liuhua
2024-12-02 19:05:18 +08:00
committed by GitHub
parent 8b650fc9ef
commit 9654e64a0a
2 changed files with 36 additions and 29 deletions

View File

@ -947,7 +947,7 @@ class API4Conversation(DataBaseModel):
reference = JSONField(null=True, default=[])
tokens = IntegerField(default=0)
source = CharField(max_length=16, null=True, help_text="none|agent|dialog", index=True)
dsl = JSONField(null=True, default={})
duration = FloatField(default=0, index=True)
round = IntegerField(default=0, index=True)
thumb_up = IntegerField(default=0, index=True)
@ -1070,3 +1070,10 @@ def migrate_db():
)
except Exception:
pass
try:
migrate(
migrator.add_column("api_4_conversation","dsl",JSONField(null=True, default={}))
)
except Exception:
pass