feat(agent):support chat agent scene use dbgpts (#1075)

This commit is contained in:
明天
2024-01-16 20:15:54 +08:00
committed by GitHub
parent fb2d18a2d5
commit 74eb15e01c
82 changed files with 1081 additions and 637 deletions

View File

@@ -6,7 +6,6 @@ from dbgpt.util.json_utils import serialize
class Vis:
@abstractmethod
async def generate_param(self, **kwargs) -> Optional[str]:
"""
Display corresponding content using vis protocol
@@ -16,6 +15,7 @@ class Vis:
Returns:
vis protocol text
"""
return kwargs["content"]
async def disply(self, **kwargs) -> Optional[str]:
return f"```{self.vis_tag()}\n{json.dumps(await self.generate_param(**kwargs), default=serialize, ensure_ascii=False)}\n```"