LogEntry/LogStream use str instead of uuid for id (#11080)

Cast the UUID to a string
pull/11091/head
Eugene Yurtsev 11 months ago committed by GitHub
parent d85339b9f2
commit d19fd0cfae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -193,7 +193,7 @@ class LogStreamCallbackHandler(BaseTracer):
"op": "replace",
"path": "",
"value": RunState(
id=run.id,
id=str(run.id),
streamed_output=[],
final_output=None,
logs=[],

@ -379,7 +379,7 @@ async def test_prompt() -> None:
assert stream_log[0].ops[0]["value"]["logs"] == []
assert stream_log[0].ops[0]["value"]["final_output"] is None
assert stream_log[0].ops[0]["value"]["streamed_output"] == []
assert type(stream_log[0].ops[0]["value"]["id"]) == UUID
assert type(stream_log[0].ops[0]["value"]["id"]) == str
assert stream_log[1:] == [
RunLogPatch(
@ -1414,7 +1414,7 @@ async def test_map_astream() -> None:
assert final_state.state["final_output"] == final_value
assert len(final_state.state["streamed_output"]) == len(streamed_chunks)
assert isinstance(final_state.state["id"], UUID)
assert type(final_state.state["id"]) == str
assert len(final_state.ops) == len(streamed_ops)
assert len(final_state.state["logs"]) == 5
assert final_state.state["logs"][0]["name"] == "ChatPromptTemplate"

Loading…
Cancel
Save