MetaGPT icon indicating copy to clipboard operation
MetaGPT copied to clipboard

Only the product manager's output is obtained, and the outputs are duplicated.

Open GG-Lizen opened this issue 1 year ago • 2 comments

Environment information

  • LLM type and model name:chatglm2-6b
  • System version:win11
  • Python version: 3.10.13
  • installation method: pip install -e .

Configuration ~/.metagpt/config2.yaml

# Full Example: https://github.com/geekan/MetaGPT/blob/main/config/config2.example.yaml
# Reflected Code: https://github.com/geekan/MetaGPT/blob/main/metagpt/config2.py
llm:
  api_type: "open_llm"  # or azure / ollama / open_llm etc. Check LLMType for more options
  model: "chatglm2-6b"  # or gpt-3.5-turbo-1106 / gpt-4-1106-preview
  base_url: "http://localhost:8000/v1"  # or forward url / other llm url
  api_key: "123"
repair_llm_output: true  

config/key.yaml

## The official OPENAI_API_BASE is https://api.openai.com/v1
## If the official OPENAI_API_BASE is not available, we recommend using the [openai-forward](https://github.com/beidongjiedeguang/openai-forward).
## Or, you can configure OPENAI_PROXY to access official OPENAI_API_BASE.
OPENAI_API_BASE: "http://localhost:8000/v1"
#OPENAI_PROXY: "http://127.0.0.1:8118"
OPENAI_API_KEY: "sk-123"
OPENAI_API_MODEL: "chatglm2-6b"
MAX_TOKENS: 8192
RPM: 10

Bug description I deployed my local model chatglm2-6b using FastChat and Metagpt was installed via source.when i run: metagpt "create a 2048 game",get the following output:

2024-03-13 23:33:39.261 | INFO     | metagpt.const:get_metagpt_package_root:29 - Package root set to e:\mytask\metagpt\metagpt
D:\Dev_Software\Anaconda\envs\metagpt\lib\site-packages\langchain\vectorstores\__init__.py:35: LangChainDeprecationWarning: Importing vector stores from langchain is deprecated. Importing from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:

`from langchain_community.vectorstores import Chroma`.

To install langchain-community run `pip install -U langchain-community`.
  warnings.warn(
D:\Dev_Software\Anaconda\envs\metagpt\lib\site-packages\langchain\vectorstores\__init__.py:35: LangChainDeprecationWarning: Importing vector stores from langchain is deprecated. Importing from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:

`from langchain_community.vectorstores import FAISS`.

To install langchain-community run `pip install -U langchain-community`.
  warnings.warn(
2024-03-13 23:33:44.637 | INFO     | metagpt.team:invest:90 - Investment: $3.0.
2024-03-13 23:33:44.641 | INFO     | metagpt.roles.role:_act:399 - Alice(Product Manager): to do PrepareDocuments(PrepareDocuments)
2024-03-13 23:33:44.779 | INFO     | metagpt.utils.file_repository:save:60 - save to: E:\MyTask\Metagpt\MetaGPT\workspace\20240313233344\docs\requirement.txt
2024-03-13 23:33:44.782 | INFO     | metagpt.roles.role:_act:399 - Alice(Product Manager): to do WritePRD(WritePRD)
2024-03-13 23:33:44.788 | INFO     | metagpt.actions.write_prd:run:86 - New requirement detected: create a 2048 game
As a Product Manager, my goal is to create a successful 2048 game that meets market demands and user expectations. Using the same language as the user requirements for seamless communication, I will work to ensure that the game is easy to understand and use, visually appealing, and provides an enjoyable and satisfying experience for the player.

Here is a summary of the project information:

Project Name: game\_2048

Original Requirements: Create a 2048 game

Product Goals:

* Create an engaging user experience
* Improve accessibility, be responsive
* More beautiful UI

User Stories:

* As a player, I want to be able to choose difficulty levels
* As a player, I want to see my score after each game
* As a player, I want to get restart button when I lose
* As a player, I want to see beautiful UI that make me feel good
* As a player, I want to play game via mobile phone

Competitive Analysis:

* 2048 Game A: Simple interface, lacks responsive features
* play2048.co: Beautiful and responsive UI with my best score shown
* 2048game.com: Responsive UI with my best score shown, but many ads

Competitive Quadrant Chart:

| Title | "Reach and engagement of campaigns" |
| --- | --- |
| Low Reach | "We should expand" |
| Low Engagement | "Need to promote" |
| UNCLEAR | "May be improved" |
| High Reach | "Campaign A" |
| High Engagement | "Campaign B" |
| UNCLEAR | "Campaign C" |
| High Reach | "Campaign D" |
| High Engagement | "Campaign E" |
| UNCLEAR | "Campaign F" |
| Our Target Product | "Need to promote" |

Requirement Analysis:

The game algorithm is the core functionality that makes the game work. It should allow the player to play the game, keep track of their score, and provide a way for the player to restart the game when they lose. The UI design is also important to the success of the game. It should be visually appealing and easy to use, with clear and responsive navigation.

Requirement Pool:

* The game algorithm
* The game UI design

UI Design draft:

The UI design is an essential part of the game. It should be visually appealing and easy to use, with clear and responsive navigation. The layout should be simple and intuitive, with a clear focus on the game controls and score display.

Anything UNCLEAR:

* The game algorithm is the core functionality of the game, but it is unclear what the specific requirements are for the game.
* The UI design is visually appealing, but it is unclear what specific design elements will be included in the UI.
Warning: model not found. Using cl100k_base encoding.
2024-03-13 23:41:08.083 | WARNING  | metagpt.provider.openai_api:_calc_usage:267 - usage calculation failed: num_tokens_from_messages() is not implemented for model chatglm2-6b. See https://github.com/openai/openai-python/blob/main/chatml.md for information on how messages are converted to tokens.
2024-03-13 23:41:08.084 | INFO     | metagpt.utils.cost_manager:update_cost:108 - prompt_tokens: 0, completion_tokens: 0
2024-03-13 23:44:10.643 | WARNING  | tenacity.after:log_it:44 - Finished call to 'metagpt.provider.openai_api.OpenAILLM.acompletion_text' after 625.860(s), this was the 1st time calling it.

Then there's the repeated Product Manager output and warning. So is this a network issue or the model is too small or other issue?Is there anyone who can help me with my issue? I would greatly appreciate it!

GG-Lizen avatar Mar 13 '24 15:03 GG-Lizen

Is this Metagpt v0.6? I noticed that the format returned by LLM is incorrect. The expected format is [CONTENT]json[/CONTENT]. But the llm returns:

As a Product Manager, my goal is to create a successful 2048 game that meets market demands and user expectations. Using the same language as the user requirements for seamless communication, I will work to ensure that the game is easy to understand and use, visually appealing, and provides an enjoyable and satisfying experience for the player.

Here is a summary of the project information:

Project Name: game\_2048

Original Requirements: Create a 2048 game

Product Goals:

* Create an engaging user experience
* Improve accessibility, be responsive
* More beautiful UI

User Stories:

* As a player, I want to be able to choose difficulty levels
* As a player, I want to see my score after each game
* As a player, I want to get restart button when I lose
* As a player, I want to see beautiful UI that make me feel good
* As a player, I want to play game via mobile phone

Competitive Analysis:

* 2048 Game A: Simple interface, lacks responsive features
* play2048.co: Beautiful and responsive UI with my best score shown
* 2048game.com: Responsive UI with my best score shown, but many ads

Competitive Quadrant Chart:

| Title | "Reach and engagement of campaigns" |
| --- | --- |
| Low Reach | "We should expand" |
| Low Engagement | "Need to promote" |
| UNCLEAR | "May be improved" |
| High Reach | "Campaign A" |
| High Engagement | "Campaign B" |
| UNCLEAR | "Campaign C" |
| High Reach | "Campaign D" |
| High Engagement | "Campaign E" |
| UNCLEAR | "Campaign F" |
| Our Target Product | "Need to promote" |

Requirement Analysis:

The game algorithm is the core functionality that makes the game work. It should allow the player to play the game, keep track of their score, and provide a way for the player to restart the game when they lose. The UI design is also important to the success of the game. It should be visually appealing and easy to use, with clear and responsive navigation.

Requirement Pool:

* The game algorithm
* The game UI design

UI Design draft:

The UI design is an essential part of the game. It should be visually appealing and easy to use, with clear and responsive navigation. The layout should be simple and intuitive, with a clear focus on the game controls and score display.

Anything UNCLEAR:

* The game algorithm is the core functionality of the game, but it is unclear what the specific requirements are for the game.
* The UI design is visually appealing, but it is unclear what specific design elements will be included in the UI.

iorisa avatar Mar 14 '24 08:03 iorisa

Is this Metagpt v0.6? I noticed that the format returned by LLM is incorrect. The expected format is [CONTENT]json[/CONTENT]. But the llm returns:

As a Product Manager, my goal is to create a successful 2048 game that meets market demands and user expectations. Using the same language as the user requirements for seamless communication, I will work to ensure that the game is easy to understand and use, visually appealing, and provides an enjoyable and satisfying experience for the player.

Here is a summary of the project information:

Project Name: game\_2048

Original Requirements: Create a 2048 game

Product Goals:

* Create an engaging user experience
* Improve accessibility, be responsive
* More beautiful UI

User Stories:

* As a player, I want to be able to choose difficulty levels
* As a player, I want to see my score after each game
* As a player, I want to get restart button when I lose
* As a player, I want to see beautiful UI that make me feel good
* As a player, I want to play game via mobile phone

Competitive Analysis:

* 2048 Game A: Simple interface, lacks responsive features
* play2048.co: Beautiful and responsive UI with my best score shown
* 2048game.com: Responsive UI with my best score shown, but many ads

Competitive Quadrant Chart:

| Title | "Reach and engagement of campaigns" |
| --- | --- |
| Low Reach | "We should expand" |
| Low Engagement | "Need to promote" |
| UNCLEAR | "May be improved" |
| High Reach | "Campaign A" |
| High Engagement | "Campaign B" |
| UNCLEAR | "Campaign C" |
| High Reach | "Campaign D" |
| High Engagement | "Campaign E" |
| UNCLEAR | "Campaign F" |
| Our Target Product | "Need to promote" |

Requirement Analysis:

The game algorithm is the core functionality that makes the game work. It should allow the player to play the game, keep track of their score, and provide a way for the player to restart the game when they lose. The UI design is also important to the success of the game. It should be visually appealing and easy to use, with clear and responsive navigation.

Requirement Pool:

* The game algorithm
* The game UI design

UI Design draft:

The UI design is an essential part of the game. It should be visually appealing and easy to use, with clear and responsive navigation. The layout should be simple and intuitive, with a clear focus on the game controls and score display.

Anything UNCLEAR:

* The game algorithm is the core functionality of the game, but it is unclear what the specific requirements are for the game.
* The UI design is visually appealing, but it is unclear what specific design elements will be included in the UI.

clone from main branch

GG-Lizen avatar Mar 14 '24 12:03 GG-Lizen

The expected format is [CONTENT]json[/CONTENT], which is required in prompt. No one can format the unexpected content except llm.

iorisa avatar Mar 19 '24 08:03 iorisa