Implement IssueAgent
This commit is contained in:
@@ -210,6 +210,14 @@ class IssueStorage:
|
||||
return issue
|
||||
|
||||
|
||||
class IssueAgent(CustomAIAgent):
|
||||
async def _process_msg(self, msg: AgentMsg, workspace=None) -> AgentMsg:
|
||||
pass
|
||||
|
||||
def __init__(self, agent_id: str, llm_model_name: str, max_token_size: int) -> None:
|
||||
super().__init__(agent_id, llm_model_name, max_token_size)
|
||||
|
||||
|
||||
class IssueParserEnvironment(Environment):
|
||||
def __init__(self, env_id: str, storage: IssueStorage) -> None:
|
||||
super().__init__(env_id)
|
||||
@@ -305,7 +313,7 @@ class IssueParser:
|
||||
Then call the function create_issue or update_issue.
|
||||
if this mail is not associated with issue, you should ignore this mail.'''}
|
||||
|
||||
prompt.append(AgentPrompt(f'''Mail is {mail_str}, issue is {issue_str}. Answer me the function's return value or None if igonred.
|
||||
prompt.append(IssueAgent(f'''Mail is {mail_str}, issue is {issue_str}. Answer me the function's return value or None if igonred.
|
||||
'''))
|
||||
|
||||
llm_result = await CustomAIAgent("issue parser", "gpt-4-1106-preview", 4000).do_llm_complection(prompt, env=self.llm_env)
|
||||
|
||||
Reference in New Issue
Block a user