Reformat code
This commit is contained in:
parent
900065b158
commit
75e23de4ba
|
@ -43,7 +43,7 @@ def guardrails_node(state: EmailGenerationState) -> EmailGenerationState:
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
"locale": lead_model.locale if lead_model else "ru",
|
"locale": lead_model.locale if lead_model else "ru",
|
||||||
"lead_normalized": lead_model.dict() if lead_model else {},
|
"lead_normalized": lead_model.model_dump() if lead_model else {},
|
||||||
"used_chunks": email_draft.used_chunks,
|
"used_chunks": email_draft.used_chunks,
|
||||||
"model": llm_output.model if llm_output else "unknown",
|
"model": llm_output.model if llm_output else "unknown",
|
||||||
"tokens_prompt": llm_output.tokens_prompt if llm_output else 0,
|
"tokens_prompt": llm_output.tokens_prompt if llm_output else 0,
|
||||||
|
|
|
@ -41,7 +41,7 @@ def parse_output_node(state: EmailGenerationState) -> EmailGenerationState:
|
||||||
|
|
||||||
ranked_context = state.get("ranked_context")
|
ranked_context = state.get("ranked_context")
|
||||||
real_chunk_ids = []
|
real_chunk_ids = []
|
||||||
|
|
||||||
if isinstance(used_chunks, list) and ranked_context:
|
if isinstance(used_chunks, list) and ranked_context:
|
||||||
for chunk_idx in used_chunks:
|
for chunk_idx in used_chunks:
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue