mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-01 20:03:28 +02:00
refactor: think
This commit is contained in:
parent
a147bdf92a
commit
c8e24aa39b
1 changed files with 2 additions and 2 deletions
|
|
@ -277,9 +277,9 @@ class OpenAIGPTAPI(BaseGPTAPI, RateLimiter):
|
|||
|
||||
async def is_related(self, text1, text2):
|
||||
# command = f"{text1}\n{text2}\n\nIf the two sentences above are related, return [TRUE] brief and clear. Otherwise, return [FALSE]."
|
||||
command = f"{text2}\n\nIs there any sentence above related to the following sentence: {text1}.\nIf is there any relevance, return [TRUE]:1 brief and clear. Otherwise, return [FALSE]:1 brief and clear."
|
||||
command = f"{text2}\n\nIs there any sentence above related to the following sentence: {text1}.\nIf is there any relevance, return [TRUE] brief and clear. Otherwise, return [FALSE] brief and clear."
|
||||
rsp = await self.aask(msg=command, system_msgs=[])
|
||||
result, _ = self.extract_info(rsp)
|
||||
result, _ = self.extract_info(rsp, pattern=r"\[([A-Z]+)\]\s*(.+)")
|
||||
return result == "TRUE"
|
||||
|
||||
async def rewrite(self, sentence: str, context: str):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue