Skip to content

Feat: New workflow for AI#26

Merged
TenzDelek merged 7 commits intomainfrom
workflowai
Mar 23, 2026
Merged

Feat: New workflow for AI#26
TenzDelek merged 7 commits intomainfrom
workflowai

Conversation

@TenzDelek
Copy link
Copy Markdown
Member

@TenzDelek TenzDelek commented Mar 23, 2026

fixes #25

@TenzDelek TenzDelek marked this pull request as ready for review March 23, 2026 09:23
@TenzDelek
Copy link
Copy Markdown
Member Author

waiting for @lobsam fixes . not a blocker.

) -> list[str]:
endpoint = f"{EXTERNAL_PECHA_API_URL}/instances/{instance_id}/segment-related?span_start={span_start}&span_end={span_end}&transform=false"
try:
response = await client.get(endpoint, headers=ACCEPT_JSON_HEADER, timeout=60.0)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

timeout set as 1 min due to slow response from api server

)
all_segment_ids.extend(segment_ids)

segment_contents = await asyncio.gather(
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gather the id parallely

)

collected_contents = []
for sid, result in zip(all_segment_ids, segment_contents):
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cleanup, remove unwanted error output

Comment on lines +92 to +96
if collected_contents:
for content in collected_contents:
workflow_request.contexts.append(
ContextRequest(content=content)
)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

appended as context. no extra field added. make sense as it is similar to context

Copy link
Copy Markdown
Member Author

@TenzDelek TenzDelek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self reviewed

@TenzDelek
Copy link
Copy Markdown
Member Author

merging as it is not a blocker. but it should be fix to make the context better. currently we are just printing the error.
image

@lobsam

@TenzDelek TenzDelek merged commit ac9047d into main Mar 23, 2026
2 checks passed
@TenzDelek TenzDelek deleted the workflowai branch March 23, 2026 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FEAT: Change in AI Workflow

1 participant