Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Alibaba Cloud Bailian-deepseek-r1 model answer is not complete #2281

Closed
tnnevol opened this issue Feb 14, 2025 · 10 comments
Closed

[Bug] Alibaba Cloud Bailian-deepseek-r1 model answer is not complete #2281

tnnevol opened this issue Feb 14, 2025 · 10 comments
Assignees

Comments

@tnnevol
Copy link

tnnevol commented Feb 14, 2025

Contact Information

No response

MaxKB Version

1.10.1-lts

Problem Description

对接了阿里云的deepseek-r1 模型,应用回答的内容总是没有描述完整就直接结束了

image|690x193
image|690x246

后期观察了一下ai回复的api,在ai接口的响应内容字段中确实没有给出完整的文本内容。

Steps to Reproduce

配置

image|467x500
image|690x277
image|391x499

应用设置的参数未做调整,仅删除开场白,未关联知识库

_vol1_1panel_1panel_apps_maxkb_maxkb_docker-compose.yml-20250214142350.log

常问问题(回答问题不完整问题)

  • vue 想要给变量定义一个ref类型该怎么做
  • vue组合式api的生命钩子有哪些

The expected correct result

No response

Related log output

Additional Information

No response

@shaohuzhang1 shaohuzhang1 changed the title [Bug] 阿里云百炼-deepseek-r1模型回答内容并不完整 [Bug] Alibaba Cloud Bailian-deepseek-r1 model answer is not complete Feb 14, 2025
@Shenguobin0102
Copy link

您好,感谢反馈。您描述的问题在我们的环境上没有复现,我们使用以下提示词,问了AI:

你能用Python写一个坦克大战的网页游戏吗,要求:
1.战场为正方形的绿色草地;
2.每局可随机生成各种掩体、障碍,掩体和障碍的材质分金属、砖石两种,金属不可击毁,砖石可以击毁;
3.玩家操控的坦克通过方向键操控前进后退、向左向右;
4.玩家坦克有三条生命,被击中一次将死亡,并消耗一条生命后原地复活,生命全部消耗后,本局游戏结束,玩家失败;
5.敌方坦克有两种型号,基础型号被击中一次即死亡,加强型号需要击中三次后才死亡;
6.一局游戏中敌方坦克全部被击毁后,玩家胜利。
请以以上规则生成游戏代码

生成的回答是完整的,如下图:

Image
Image
Image

请问您问了什么样的问题出现了这种现象呢?可以把问题贴出来,我们再试试。

@shaohuzhang1
Copy link
Contributor

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Hello, thanks for the feedback. The problem you described is not reproduced in our environment, we asked AI using the following prompt words:

Can you write a Tank War web game in Python? Requirements:

  1. The battlefield is a square green grass;
  2. Various bunkers and obstacles can be randomly generated in each game. The materials of bunkers and obstacles are divided into metal and masonry. Metal cannot be destroyed, and masonry can be destroyed;
  3. The tank controlled by the player moves forward and backward, left and right through the direction keys;
  4. The player's tank has three lives, and if you are hit once, you will die. After one life is consumed, you will be resurrected on the spot. After all your lives are consumed, the game will end and the player will fail;
  5. There are two types of enemy tanks. The basic model will die if it is hit once, and the enhanced model will need to hit three times before it dies;
  6. After all enemy tanks are destroyed in one game, the player will win.
    Please use the above rules to generate game code

The generated answer is complete, as shown below:

Image
Image
Image

What kind of questions did you ask have this phenomenon? You can post the question and let's try again.

@tnnevol
Copy link
Author

tnnevol commented Feb 14, 2025

您好,感谢反馈。您描述的问题在我们的环境上没有复现,我们使用以下提示词,问了AI:

你能用Python写一个坦克大战的网页游戏吗,要求:
1.战场为正方形的绿色草地;
2.每局可随机生成各种掩体、障碍,掩体和障碍的材质分金属、砖石两种,金属不可击毁,砖石可以击毁;
3.玩家操控的坦克通过方向键操控前进后退、向左向右;
4.玩家坦克有三条生命,被击中一次将死亡,并消耗一条生命后原地复活,生命全部消耗后,本局游戏结束,玩家失败;
5.敌方坦克有两种型号,基础型号被击中一次即死亡,加强型号需要击中三次后才死亡;
6.一局游戏中敌方坦克全部被击毁后,玩家胜利。
请以以上规则生成游戏代码

生成的回答是完整的,如下图:

Image Image Image

请问您问了什么样的问题出现了这种现象呢?可以把问题贴出来,我们再试试。

这是我最近问的几个问题

vue 想要给变量定义一个ref类型该怎么做
vue组合式api的生命钩子有哪些

@shaohuzhang1
Copy link
Contributor

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Hello, thanks for the feedback. The problem you described is not reproduced in our environment, we asked AI using the following prompt words:

Can you write a Tank War web game in Python? Requirements:

  1. The battlefield is a square green grass;
  2. Various bunkers and obstacles can be randomly generated in each game. The materials of bunkers and obstacles are divided into metal and masonry. Metal cannot be destroyed, and masonry can be destroyed;
  3. The tank controlled by the player moves forward and backward, left and right through the direction keys;
  4. The player's tank has three lives, and if he is hit once, he will die, and he will consume one life and then be resurrected on the spot. After all his life is consumed, the game will end and the player will fail;
  5. There are two types of enemy tanks. The basic model will die if it is hit once, and the enhanced model will need to hit three times before it dies;
  6. After all enemy tanks are destroyed in one game, the player will win.
    Please use the above rules to generate game code

The generated answer is complete, as shown below:

Image ![Image](https://github.com/user-attachments/assets/e8e56ffd -f9cb-41d3-8e99-9de70c2a246d) Image

What kind of questions did you ask that this phenomenon occurs? You can post the question and let's try again.

These are some questions I've asked recently

vue What should I do if I want to define a ref type for a variable
What are the life hooks of Vue combination APIs?

@tnnevol
Copy link
Author

tnnevol commented Feb 14, 2025

以下是我问的同样问题

你能用Python写一个坦克大战的网页游戏吗,要求:
1.战场为正方形的绿色草地;
2.每局可随机生成各种掩体、障碍,掩体和障碍的材质分金属、砖石两种,金属不可击毁,砖石可以击毁;
3.玩家操控的坦克通过方向键操控前进后退、向左向右;
4.玩家坦克有三条生命,被击中一次将死亡,并消耗一条生命后原地复活,生命全部消耗后,本局游戏结束,玩家失败;
5.敌方坦克有两种型号,基础型号被击中一次即死亡,加强型号需要击中三次后才死亡;
6.一局游戏中敌方坦克全部被击毁后,玩家胜利。
请以以上规则生成游戏代码

api api/application/7e86088c-ea76-11ef-8d8d-0242ac13000b/chat/dd592c58-eab8-11ef-8ac6-0242ac13000b/chat_record/e3e6ae4c-eab8-11ef-a94c-0242ac13000b 的响应

{
  "code": 200,
  "message": "成功",
  "data": {
    "id": "e3e6ae4c-eab8-11ef-a94c-0242ac13000b",
    "chat_id": "dd592c58-eab8-11ef-8ac6-0242ac13000b",
    "vote_status": "-1",
    "problem_text": "你能用Python写一个坦克大战的网页游戏吗,要求:\n1.战场为正方形的绿色草地;\n2.每局可随机生成各种掩体、障碍,掩体和障碍的材质分金属、砖石两种,金属不可击毁,砖石可以击毁;\n3.玩家操控的坦克通过方向键操控前进后退、向左向右;\n4.玩家坦克有三条生命,被击中一次将死亡,并消耗一条生命后原地复活,生命全部消耗后,本局游戏结束,玩家失败;\n5.敌方坦克有两种型号,基础型号被击中一次即死亡,加强型号需要击中三次后才死亡;\n6.一局游戏中敌方坦克全部被击毁后,玩家胜利。\n请以以上规则生成游戏代码",
    "answer_text": "使用Python和Pygame实现的坦克大战游戏代码。代码包含注释说明主要功能模块:\n\n```python\nimport pygame\nimport random\nimport math\n\n# 初始化Pygame\npygame.init()\n\n# 游戏窗口设置\nSCREEN_SIZE = 800\nscreen = pygame.display.set_mode((SCREEN_SIZE, SCREEN_SIZE))\npygame.display.set_caption(\"Tank Battle\")\n\n# 颜色定义\nCOLORS = {\n    \"green\": (0, 128, 0),\n    \"black\": (0, 0, 0),\n    \"red\": (255, 0, 0),\n    \"blue\": (0, 0, 255),\n    \"gray\": (128, 128, 128),\n    \"brown\": (139, 69, 19)\n}\n\n# 游戏实体类\nclass Tank:\n    def __init__(self, x, y, color, is_player=False):\n        self.x = x\n        self.y = y\n        self.color = color\n        self",
    "message_tokens": 536,
    "answer_tokens": 229,
    "const": 0,
    "improve_paragraph_id_list": [],
    "run_time": 121.49407505989075,
    "index": 1,
    "answer_text_list": [
      [
        {
          "view_type": "ai-chat-node",
          "content": "使用Python和Pygame实现的坦克大战游戏代码。代码包含注释说明主要功能模块:\n\n```python\nimport pygame\nimport random\nimport math\n\n# 初始化Pygame\npygame.init()\n\n# 游戏窗口设置\nSCREEN_SIZE = 800\nscreen = pygame.display.set_mode((SCREEN_SIZE, SCREEN_SIZE))\npygame.display.set_caption(\"Tank Battle\")\n\n# 颜色定义\nCOLORS = {\n    \"green\": (0, 128, 0),\n    \"black\": (0, 0, 0),\n    \"red\": (255, 0, 0),\n    \"blue\": (0, 0, 255),\n    \"gray\": (128, 128, 128),\n    \"brown\": (139, 69, 19)\n}\n\n# 游戏实体类\nclass Tank:\n    def __init__(self, x, y, color, is_player=False):\n        self.x = x\n        self.y = y\n        self.color = color\n        self",
          "runtime_node_id": "ai-chat-node",
          "chat_record_id": "ai-chat-node",
          "child_node": {},
          "reasoning_content": "好的,用户让我用Python写一个坦克大战的网页游戏,还给了六个具体要求。首先,我需要确定用什么技术栈。因为用户提到是网页游戏,Python的话通常会考虑使用Pygame或者可能用Web框架,但Pygame更适合游戏开发,而且可以打包成网页应用。所以可能选Pygame。\n\n接下来,战场是正方形的绿色草地。这需要创建一个窗口,设置背景颜色为绿色。Pygame的窗口和颜色处理应该没问题。\n\n然后,每局随机生成掩体和障碍,分金属和砖石两种材质。金属不可击毁,砖石可以。这里需要设计障碍物的类,随机生成位置和类型。可能需要一个列表来存储所有障碍物,生成时随机选择类型和位置,注意不要重叠。\n\n玩家操控坦克用方向键移动。这需要处理键盘事件,上下左右键控制坦克的移动方向,可能还需要处理坦克的旋转,让炮管朝向正确方向。坦克的移动速度和碰撞检测也需要考虑,比如不能穿过障碍物或边界。\n\n玩家坦克有三条生命,被击中一次死亡,消耗生命后复活,全部用完游戏结束。这部分需要跟踪玩家的生命值,当被子弹击中时减少生命,并在复活时重置位置。同时,游戏结束的条件需要处理,比如显示胜利或失败的信息。\n\n敌方坦克有两种型号,基础型一击死亡,加强型需要三次。需要为敌人创建类,区分类型,并跟踪他们的生命值。敌人的AI可能需要自动移动和射击,比如随机移动或者追踪玩家。\n\n敌人全部被击毁后玩家胜利。需要检测所有敌人是否都被消灭,如果是,则触发胜利条件。\n\n现在需要考虑代码结构。可能会有游戏主循环,处理事件、更新游戏状态、渲染画面。各个类如Tank、Bullet、Obstacle需要定义属性和方法,比如移动、射击、碰撞检测等。\n\n碰撞检测是关键部分,子弹与坦克、障碍物之间的碰撞需要精确判断。可能需要使用pygame的sprite模块来处理碰撞,或者自己实现矩形碰撞检测。\n\n随机生成障碍物时,要确保它们的位置不会重叠,并且分布合理。可能需要循环生成直到满足条件。\n\n敌人的AI部分,可能需要一个简单的移动逻辑,比如随机改变方向,或者向玩家方向移动。射击频率也需要控制,比如每隔一定时间发射子弹。\n\n测试各个功能是否正常,比如坦克移动是否顺畅,子弹发射是否正确,碰撞是否检测准确,生命值是否正确减少,游戏结束条件是否触发等。\n\n可能遇到的问题包括性能优化,比如大量子弹或敌人时的处理,以及碰撞检测的效率。此外,游戏的平衡性,比如敌人的数量和强度是否合理。\n\n最后,确保代码结构清晰,注释充分,方便用户理解和修改。可能需要将代码分成多个部分,比如类定义、初始化、游戏循环等。",
          "real_node_id": "ai-chat-node"
        }
      ]
    ],
    "create_time": null,
    "update_time": null,
    "padding_problem_text": null,
    "dataset_list": [],
    "paragraph_list": [],
    "execution_details": [
      {
        "step_type": "search_step",
        "paragraph_list": [],
        "run_time": 0.0007708072662353516,
        "problem_text": "你能用Python写一个坦克大战的网页游戏吗,要求:\n1.战场为正方形的绿色草地;\n2.每局可随机生成各种掩体、障碍,掩体和障碍的材质分金属、砖石两种,金属不可击毁,砖石可以击毁;\n3.玩家操控的坦克通过方向键操控前进后退、向左向右;\n4.玩家坦克有三条生命,被击中一次将死亡,并消耗一条生命后原地复活,生命全部消耗后,本局游戏结束,玩家失败;\n5.敌方坦克有两种型号,基础型号被击中一次即死亡,加强型号需要击中三次后才死亡;\n6.一局游戏中敌方坦克全部被击毁后,玩家胜利。\n请以以上规则生成游戏代码",
        "model_name": null,
        "message_tokens": 0,
        "answer_tokens": 0,
        "cost": 0
      },
      {
        "step_type": "chat_step",
        "run_time": 121.4923837184906,
        "model_id": "ddf24cc8-ea75-11ef-8d8d-0242ac13000b",
        "message_list": [
          {
            "role": "ai",
            "content": "你是 xxx 小助手"
          },
          {
            "role": "user",
            "content": "你能用Python写一个坦克大战的网页游戏吗,要求:\n1.战场为正方形的绿色草地;\n2.每局可随机生成各种掩体、障碍,掩体和障碍的材质分金属、砖石两种,金属不可击毁,砖石可以击毁;\n3.玩家操控的坦克通过方向键操控前进后退、向左向右;\n4.玩家坦克有三条生命,被击中一次将死亡,并消耗一条生命后原地复活,生命全部消耗后,本局游戏结束,玩家失败;\n5.敌方坦克有两种型号,基础型号被击中一次即死亡,加强型号需要击中三次后才死亡;\n6.一局游戏中敌方坦克全部被击毁后,玩家胜利。\n请以以上规则生成游戏代码"
          },
          {
            "role": "ai",
            "content": "使用Python和Pygame实现的坦克大战游戏代码。代码包含注释说明主要功能模块:\n\n```python\nimport pygame\nimport random\nimport math\n\n# 初始化Pygame\npygame.init()\n\n# 游戏窗口设置\nSCREEN_SIZE = 800\nscreen = pygame.display.set_mode((SCREEN_SIZE, SCREEN_SIZE))\npygame.display.set_caption(\"Tank Battle\")\n\n# 颜色定义\nCOLORS = {\n    \"green\": (0, 128, 0),\n    \"black\": (0, 0, 0),\n    \"red\": (255, 0, 0),\n    \"blue\": (0, 0, 255),\n    \"gray\": (128, 128, 128),\n    \"brown\": (139, 69, 19)\n}\n\n# 游戏实体类\nclass Tank:\n    def __init__(self, x, y, color, is_player=False):\n        self.x = x\n        self.y = y\n        self.color = color\n        self"
          }
        ],
        "message_tokens": 536,
        "answer_tokens": 229,
        "cost": 0
      }
    ]
  }
}

依旧不完整,我目前打算删除应用重新安装试试了

Image

@shaohuzhang1
Copy link
Contributor

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Here are the same questions I asked

Can you write a Tank War web game in Python? Requirements:

  1. The battlefield is a square green grass;
  2. Various bunkers and obstacles can be randomly generated in each game. The materials of bunkers and obstacles are divided into metal and masonry. Metal cannot be destroyed, and masonry can be destroyed;
  3. The tank controlled by the player moves forward and backward, left and right through the direction keys;
  4. The player's tank has three lives, and if you are hit once, you will die. After one life is consumed, you will be resurrected on the spot. After all your lives are consumed, the game will end and the player will fail;
  5. There are two types of enemy tanks. The basic model will die if it is hit once, and the enhanced model will need to hit three times before it dies;
  6. After all enemy tanks are destroyed in one game, the player will win.
    Please use the above rules to generate game code

Response of api api/application/7e86088c-ea76-11ef-8d8d-0242ac13000b/chat/dd592c58-eab8-11ef-8ac6-0242ac13000b/chat_record/e3e6ae4c-eab8-11ef-a94c-0242ac13000b

{
  "code": 200,
  "message": "Success",
  "data": {
    "id": "e3e6ae4c-eab8-11ef-a94c-0242ac13000b",
    "chat_id": "dd592c58-eab8-11ef-8ac6-0242ac13000b",
    "vote_status": "-1",
    "problem_text": "Can you write a web game of tank war in Python? Requirements: \n1. The battlefield is a square green grass; \n2. Each game can randomly generate various bunkers, obstacles, bunkers and obstacles. Metal and masonry, metal cannot be destroyed, masonry can be destroyed;\n3. The tank controlled by the player moves forward and backward, left and right through the direction keys;\n4. The player's tank has three lives, and being hit once will die , and then resurrected on the spot after consuming one life. After all life is consumed, the game ends and the player fails; \n5. There are two types of enemy tanks. The basic model will die if it is hit once. The enhanced model needs to be hit three times before it can be hit. Death;\n6. After all enemy tanks are destroyed in one game, the player will win.\nPlease use the above rules to generate the game code",
    "answer_text": "Tank War game code implemented using Python and Pygame. The code contains comments and instructions:\n\n```python\nmport pygame\nmport random\nmport math\n\n# Initialize Pygame\npygame .init()\n\n# Game window settings\nSCREEN_SIZE = 800\nscreen = pygame.display.set_mode((SCREEN_SIZE, SCREEN_SIZE))\npygame.display.set_caption(\"Tank Battle\")\n\n# Color definition\nCOLORS = {\n \"green\": (0, 128, 0),\n \"black\": (0, 0, 0),\n \"red\": (255, 0 , 0),\n \"blue\": (0, 0, 255),\n \"gray\": (128, 128, 128),\n \"brown\": (139, 69, 19 )\n}\n\n# Game Entity Class\nclass Tank:\n def __init__(self, x, y, color, is_player=False):\n self.x = x\n self.y = y\n self.color = color\n self",
    "message_tokens": 536,
    "answer_tokens": 229,
    "const": 0,
    "improve_paragraph_id_list": [],
    "run_time": 121.49407505989075,
    "index": 1,
    "answer_text_list": [
      [
        {
          "view_type": "ai-chat-node",
          "content": "Tank War game code implemented using Python and Pygame. The code contains comments and instructions:\n\n```python\nmport pygame\nmport random\nmport math\n\n# Initialize Pygame\npygame .init()\n\n# Game window settings\nSCREEN_SIZE = 800\nscreen = pygame.display.set_mode((SCREEN_SIZE, SCREEN_SIZE))\npygame.display.set_caption(\"Tank Battle\")\n\n# Color definition\nCOLORS = {\n \"green\": (0, 128, 0),\n \"black\": (0, 0, 0),\n \"red\": (255, 0 , 0),\n \"blue\": (0, 0, 255),\n \"gray\": (128, 128, 128),\n \"brown\": (139, 69, 19 )\n}\n\n# Game Entity Class\nclass Tank:\n def __init__(self, x, y, color, is_player=False):\n self.x = x\n self.y = y\n self.color = color\n self",
          "runtime_node_id": "ai-chat-node",
          "chat_record_id": "ai-chat-node",
          "child_node": {},
          "reasoning_content": "Okay, the user asked me to write a Tank War web game in Python, and gave six specific requirements. First, I need to determine which technology stack to use. Because the user mentioned it is a web game, Python usually I would consider using Pygame or maybe using a web framework, but Pygame is more suitable for game development and can be packaged into a web application. So I might choose Pygame. \n\nNext, the battlefield is a square green grass. This requires creating a window and setting up The background color is green. The window and color processing of Pygame should be fine. \n\nThen, bunkers and obstacles are randomly generated in each game, divided into two materials: metal and masonry. Metal cannot be destroyed, masonry can. Design obstacles are needed here. The object class, randomly generates locations and types. A list may be needed to store all obstacles. Randomly select types and locations when generating, be careful not to overlap. \n\nThe player controls the tank to move with the arrow keys. This requires handling of keyboard events, Up, down, left and right keys control the movement direction of the tank. It may also need to handle the rotation of the tank to make the barrel head in the right direction. The movement speed and collision detection of the tank also need to be considered, such as not being able to pass through obstacles or boundaries. \n\nPlayer Tank There are three lives, one death hit, and after consuming life, they are resurrected, all of which are used up. This part requires tracking the player's health, reducing life when hit by a bullet, and resetting the position when resurrected. At the same time, the game The ending condition needs to be processed, such as displaying information about victory or failure. \n\nThere are two types of enemy tanks, the base type has one strike and the reinforcement type requires three times. You need to create classes for enemies, distinguish types, and track their Health. Enemy's AI may need to automatically move and shoot, such as random movement or track the player. \n\nThe player wins after all enemies are destroyed. It is necessary to check whether all enemies are destroyed, and if so, the victory condition is triggered. \ n\nNow you need to consider the code structure. There may be a main loop of the game, which handles events, updates game state, and renders the picture. Various categories such as Tank, Bullet, and Obstacle need to define attributes and methods, such as movement, shooting, collision detection, etc. n\nCollision detection is a key part, and collisions between bullets and tanks and obstacles need to be accurately judged. You may need to use pygame's sprite module to handle collisions, or implement rectangular collision detection by yourself. \n\n When randomly generating obstacles , to make sure their positions do not overlap and are distributed reasonably. It may need to loop generation until the conditions are met. \n\nThe enemy's AI part may require a simple movement logic, such as randomly changing directions, or moving towards the player. The shooting frequency also needs to be controlled, such as firing bullets every certain time. \n\nTest whether each function is normal, such as whether the tank moves smoothly, whether the bullet is launched correctly, whether the collision is detected accurately, whether the health value is reduced correctly, and whether the game end conditions are Trigger etc. \n\nMay encounter problems include performance optimization, such as handling when a large number of bullets or enemies, and the efficiency of collision detection. In addition, the balance of the game, such as whether the number and strength of the enemies are reasonable. \n\nFinally, ensure that the code structure is clear and the annotations are sufficient to facilitate users to understand and modify. It may be necessary to divide the code into multiple parts, such as class definition, initialization, game loops, etc. ",
          "real_node_id": "ai-chat-node"
        }
      ]
    ],
    "create_time": null,
    "update_time": null,
    "padding_problem_text": null,
    "dataset_list": [],
    "paragraph_list": [],
    "execution_details": [
      {
        "step_type": "search_step",
        "paragraph_list": [],
        "run_time": 0.0007708072662353516,
        "problem_text": "Can you write a web game of tank war in Python? Requirements: \n1. The battlefield is a square green grass; \n2. Each game can randomly generate various bunkers, obstacles, bunkers and obstacles. Metal and masonry, metal cannot be destroyed, masonry can be destroyed;\n3. The tank controlled by the player moves forward and backward, left and right through the direction keys;\n4. The player's tank has three lives, and being hit once will die , and then resurrected on the spot after consuming one life. After all life is consumed, the game ends and the player fails; \n5. There are two types of enemy tanks. The basic model will die if it is hit once. The enhanced model needs to be hit three times before it can be hit. Death;\n6. After all enemy tanks are destroyed in one game, the player will win.\nPlease use the above rules to generate the game code",
        "model_name": null,
        "message_tokens": 0,
        "answer_tokens": 0,
        "cost": 0
      },
      {
        "step_type": "chat_step",
        "run_time": 121.4923837184906,
        "model_id": "ddf24cc8-ea75-11ef-8d8d-0242ac13000b",
        "message_list": [
          {
            "role": "ai",
            "content": "You are the little assistant of xxx"
          },
          {
            "role": "user",
            "content": "Can you write a web game of Tank War in Python? Requirements: \n1. The battlefield is a square green grass; \n2. Each game can randomly generate various bunkers, obstacles, bunkers and obstacles. Metal and masonry, metal cannot be destroyed, masonry can be destroyed;\n3. The tank controlled by the player moves forward and backward, left and right through the direction keys;\n4. The player's tank has three lives, and being hit once will die , and then resurrected on the spot after consuming one life. After all life is consumed, the game ends and the player fails; \n5. There are two types of enemy tanks. The basic model will die if it is hit once. The enhanced model needs to be hit three times before it can be hit. Death;\n6. After all enemy tanks are destroyed in one game, the player will win.\nPlease use the above rules to generate the game code"
          },
          {
            "role": "ai",
            "content": "Tank War game code implemented using Python and Pygame. The code contains comments and instructions:\n\n```python\nmport pygame\nmport random\nmport math\n\n# Initialize Pygame\npygame .init()\n\n# Game window settings\nSCREEN_SIZE = 800\nscreen = pygame.display.set_mode((SCREEN_SIZE, SCREEN_SIZE))\npygame.display.set_caption(\"Tank Battle\")\n\n# Color definition\nCOLORS = {\n \"green\": (0, 128, 0),\n \"black\": (0, 0, 0),\n \"red\": (255, 0 , 0),\n \"blue\": (0, 0, 255),\n \"gray\": (128, 128, 128),\n \"brown\": (139, 69, 19 )\n}\n\n# Game Entity Class\nclass Tank:\n def __init__(self, x, y, color, is_player=False):\n self.x = x\n self.y = y\n self.color = color\n self"
          }
        ],
        "message_tokens": 536,
        "answer_tokens": 229,
        "cost": 0
      }
    ]
  }
}

Still incomplete, I'm currently planning to delete the app and try reinstalling it

Image

@zyyfit
Copy link

zyyfit commented Feb 20, 2025

请查看一下应用中的 AI模型-参数设置 的最大token数是不是正确的,或者切换一下模型重新发布应用试试
Image

@shaohuzhang1
Copy link
Contributor

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Please check whether the maximum token number of AI model-parameter settings in the application is correct, or try to switch the model and repost the application.
Image

@kleisth
Copy link

kleisth commented Feb 28, 2025

我也遇到了同样的问题,要求写一个故事时,总是输出不到1000字时就中断,换用chatbox接入同样的模型毫无问题。

Image

@shaohuzhang1
Copy link
Contributor

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I also encountered the same problem. When I asked to write a story, it would always be interrupted when it outputs less than 1000 words. There is no problem in using chatbox to access the same model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants