conversation-session-unbound-resume.json 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-unbound-resume",
  4. "spec": "./test/e2e/conversation-session/runtime/conversation-session-unbound-resume.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "unbound-title",
  8. "metadata": {
  9. "kind": "common",
  10. "source": "synthetic",
  11. "timingPolicy": "fast-text",
  12. "syntheticReason": "验证历史恢复与重新选模后继续发送,不依赖模型生成质量,使用固定快速回复。"
  13. },
  14. "match": {
  15. "method": "POST",
  16. "pathIncludes": "/chat/completions",
  17. "bodyIncludes": ["Generate a concise title"]
  18. },
  19. "response": {
  20. "statusCode": 200,
  21. "headers": {
  22. "content-type": "application/json; charset=utf-8"
  23. },
  24. "body": "{\"id\":\"unbound\",\"object\":\"chat.completion\",\"created\":0,\"model\":\"glm-5.2\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"{\\\"title\\\":\\\"Unbound resume\\\"}\"},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":100,\"completion_tokens\":10,\"total_tokens\":110}}"
  25. }
  26. },
  27. {
  28. "id": "unbound-history",
  29. "metadata": {
  30. "kind": "main",
  31. "source": "synthetic",
  32. "timingPolicy": "fast-text",
  33. "syntheticReason": "验证历史恢复与重新选模后继续发送,不依赖模型生成质量,使用固定快速回复。"
  34. },
  35. "match": {
  36. "method": "POST",
  37. "pathIncludes": "/chat/completions",
  38. "lastUserMessageIncludes": ["E2E_UNBOUND_RESUME_HISTORY"],
  39. "bodyExcludes": ["Generate a concise title"]
  40. },
  41. "response": {
  42. "statusCode": 200,
  43. "headers": {
  44. "content-type": "text/event-stream"
  45. },
  46. "body": "data: {\"id\":\"unbound\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"glm-5.2\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"unbound-history-ok\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"unbound\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"glm-5.2\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":100,\"completion_tokens\":10,\"total_tokens\":110}}\n\ndata: [DONE]\n\n"
  47. }
  48. },
  49. {
  50. "id": "unbound-continue_0",
  51. "metadata": {
  52. "kind": "main",
  53. "source": "synthetic",
  54. "timingPolicy": "fast-text",
  55. "syntheticReason": "验证历史恢复与重新选模后继续发送,不依赖模型生成质量,使用固定快速回复。"
  56. },
  57. "match": {
  58. "method": "POST",
  59. "pathIncludes": "/chat/completions",
  60. "lastUserMessageIncludes": ["E2E_UNBOUND_RESUME_CONTINUE_0"],
  61. "bodyExcludes": ["Generate a concise title"]
  62. },
  63. "response": {
  64. "statusCode": 200,
  65. "headers": {
  66. "content-type": "text/event-stream"
  67. },
  68. "body": "data: {\"id\":\"unbound\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"glm-5.2\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"unbound-continue-0-ok\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"unbound\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"glm-5.2\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":100,\"completion_tokens\":10,\"total_tokens\":110}}\n\ndata: [DONE]\n\n"
  69. }
  70. },
  71. {
  72. "id": "unbound-continue_1",
  73. "metadata": {
  74. "kind": "main",
  75. "source": "synthetic",
  76. "timingPolicy": "fast-text",
  77. "syntheticReason": "验证历史恢复与重新选模后继续发送,不依赖模型生成质量,使用固定快速回复。"
  78. },
  79. "match": {
  80. "method": "POST",
  81. "pathIncludes": "/chat/completions",
  82. "lastUserMessageIncludes": ["E2E_UNBOUND_RESUME_CONTINUE_1"],
  83. "bodyExcludes": ["Generate a concise title"]
  84. },
  85. "response": {
  86. "statusCode": 200,
  87. "headers": {
  88. "content-type": "text/event-stream"
  89. },
  90. "body": "data: {\"id\":\"unbound\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"glm-5.2\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"unbound-continue-1-ok\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"unbound\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"glm-5.2\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":100,\"completion_tokens\":10,\"total_tokens\":110}}\n\ndata: [DONE]\n\n"
  91. }
  92. },
  93. {
  94. "id": "unbound-continue_2",
  95. "metadata": {
  96. "kind": "main",
  97. "source": "synthetic",
  98. "timingPolicy": "fast-text",
  99. "syntheticReason": "验证历史恢复与重新选模后继续发送,不依赖模型生成质量,使用固定快速回复。"
  100. },
  101. "match": {
  102. "method": "POST",
  103. "pathIncludes": "/chat/completions",
  104. "lastUserMessageIncludes": ["E2E_UNBOUND_RESUME_CONTINUE_2"],
  105. "bodyExcludes": ["Generate a concise title"]
  106. },
  107. "response": {
  108. "statusCode": 200,
  109. "headers": {
  110. "content-type": "text/event-stream"
  111. },
  112. "body": "data: {\"id\":\"unbound\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"glm-5.2\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"unbound-continue-2-ok\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"unbound\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"glm-5.2\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":100,\"completion_tokens\":10,\"total_tokens\":110}}\n\ndata: [DONE]\n\n"
  113. }
  114. },
  115. {
  116. "id": "unbound-continue_3",
  117. "metadata": {
  118. "kind": "main",
  119. "source": "synthetic",
  120. "timingPolicy": "fast-text",
  121. "syntheticReason": "验证历史恢复与重新选模后继续发送,不依赖模型生成质量,使用固定快速回复。"
  122. },
  123. "match": {
  124. "method": "POST",
  125. "pathIncludes": "/chat/completions",
  126. "lastUserMessageIncludes": ["E2E_UNBOUND_RESUME_CONTINUE_3"],
  127. "bodyExcludes": ["Generate a concise title"]
  128. },
  129. "response": {
  130. "statusCode": 200,
  131. "headers": {
  132. "content-type": "text/event-stream"
  133. },
  134. "body": "data: {\"id\":\"unbound\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"glm-5.2\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"unbound-continue-3-ok\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"unbound\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"glm-5.2\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":100,\"completion_tokens\":10,\"total_tokens\":110}}\n\ndata: [DONE]\n\n"
  135. }
  136. }
  137. ]
  138. }