mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-24 14:15:17 +02:00
commit
de14b4a57d
3 changed files with 5 additions and 3 deletions
|
|
@ -12,8 +12,7 @@ async def main():
|
|||
web_url = "https://pytorch.org/"
|
||||
prompt = f"""This is a URL of webpage: '{web_url}' .
|
||||
Firstly, utilize Selenium and WebDriver for rendering.
|
||||
Secondly, convert image to a webpage including HTML, CSS and JS in one go.
|
||||
Finally, save webpage in a text file.
|
||||
Secondly, convert image to a webpage including HTML, CSS and JS in one go.
|
||||
Note: All required dependencies and environments have been fully installed and configured."""
|
||||
di = DataInterpreter(tools=["GPTvGenerator"])
|
||||
|
||||
|
|
|
|||
|
|
@ -10,4 +10,5 @@ async def main(requirement: str = ""):
|
|||
|
||||
if __name__ == "__main__":
|
||||
requirement = "Solve this math problem: The greatest common divisor of positive integers m and n is 6. The least common multiple of m and n is 126. What is the least possible value of m + n?"
|
||||
# answer: 60 (m = 18, n = 42)
|
||||
asyncio.run(main(requirement))
|
||||
|
|
|
|||
|
|
@ -87,7 +87,9 @@ class OpenAILLM(BaseLLM):
|
|||
collected_messages = []
|
||||
async for chunk in response:
|
||||
chunk_message = chunk.choices[0].delta.content or "" if chunk.choices else "" # extract the message
|
||||
finish_reason = chunk.choices[0].finish_reason if hasattr(chunk.choices[0], "finish_reason") else None
|
||||
finish_reason = (
|
||||
chunk.choices[0].finish_reason if chunk.choices and hasattr(chunk.choices[0], "finish_reason") else None
|
||||
)
|
||||
log_llm_stream(chunk_message)
|
||||
collected_messages.append(chunk_message)
|
||||
if finish_reason:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue