File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1059,7 +1059,7 @@ class ResponsesOutputItem(BaseModel):
10591059 """Output item in Responses API format."""
10601060
10611061 type : typing .Literal ["message" ] = "message"
1062- id : str = Field (default_factory = lambda : f"msg_test_ { uuid .uuid4 ().hex } [:24]" )
1062+ id : str = Field (default_factory = lambda : f"msg_ { uuid .uuid4 ().hex } { uuid . uuid4 (). hex } " [: 56 ] )
10631063 status : typing .Literal ["in_progress" , "completed" , "incomplete" ] = "completed"
10641064 role : typing .Literal ["assistant" ] = "assistant"
10651065 content : list [ResponsesOutputContent ] = Field (default_factory = list )
@@ -1079,7 +1079,7 @@ class ResponsesAPIResponse(ResponseBaseModelOutput):
10791079 https://platform.openai.com/docs/api-reference/responses
10801080 """
10811081
1082- id : str = Field (default_factory = lambda : f"resp_{ uuid .uuid4 ().hex } [:24]" )
1082+ id : str = Field (default_factory = lambda : f"resp_{ uuid .uuid4 ().hex } { uuid . uuid4 (). hex } " [: 55 ] )
10831083 object : typing .Literal ["response" ] = "response"
10841084 created_at : int = Field (
10851085 default_factory = lambda : int (datetime .datetime .now (tz = datetime .timezone .utc ).timestamp ()))
Original file line number Diff line number Diff line change @@ -233,7 +233,7 @@ async def generate_responses_api_streaming(
233233 _logger = logging .getLogger (__name__ )
234234
235235 response_id = f"resp_{ uuid_module .uuid4 ().hex } { uuid_module .uuid4 ().hex } " [:55 ]
236- message_id = f"msg_{ uuid_module .uuid4 ().hex [: 24 ] } "
236+ message_id = f"msg_{ uuid_module .uuid4 ().hex } { uuid_module . uuid4 (). hex } " [: 55 ]
237237 output_index = 0
238238 content_index = 0
239239 accumulated_text = ""
You can’t perform that action at this time.
0 commit comments