Open Shellmode opened 2 months ago
我测试了下, 是因为 bedrock 返回content 为空, 如下所示:
'message': {'role': 'assistant', 'content': []}}, 'stopReason': 'end_turn',
针对这种情况就返回为空:
{"id":"chatcmpl-a3aa1356","created":1723196261,"model":"anthropic.claude-3-5-sonnet-20240620-v1:0","system_fingerprint":"fp","choices":[{"index":0,"finish_reason":"stop","logprobs":null,"message":{"role":"assistant"}}],"object":"chat.completion","usage":{"prompt_tokens":112,"completion_tokens":4,"total_tokens":116}}
要使用最新功能,您无需重新部署CloudFormation堆栈。您只需拉取最新的镜像即可。
具体操作方式取决于您部署的版本:
Lambda版本: 进入AWS Lambda控制台,找到Lambda 函数,然后找到并单击部署新映像按钮,然后单击保存。 Fargate版本: 进入ECS控制台,单击ECS集群,转到任务选项卡,选择正在运行的唯一任务,然后点击停止所选菜单, ECS会自动启动新任务并且使用最新镜像。
Describe the bug 当 bedrock 返回空字符串的时候,在 https://github.com/aws-samples/bedrock-access-gateway/blob/main/src/api/models/bedrock.py#L456 处会报错,trace 如下
Please complete the following information:
To Reproduce Steps to reproduce the behavior. If possible, please share an example request.
Expected behavior Response with empty string
Screenshots
Additional context Add any other context about the problem here.