Skip to content
This repository was archived by the owner on Aug 5, 2025. It is now read-only.

Commit f381baf

Browse files
refactor: update todos
1 parent 8178a27 commit f381baf

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

examples/llamaindex_workflow.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
class JokeEvent(Event):
1717
joke: str
1818

19+
class RewriteJoke(Event):
20+
joke: str
21+
1922

2023
class JokeFlow(Workflow):
2124
llm = OpenAI()
@@ -29,7 +32,11 @@ async def generate_joke(self, ev: StartEvent) -> JokeEvent:
2932
return JokeEvent(joke=str(response))
3033

3134
@step()
32-
async def critique_joke(self, ev: JokeEvent) -> StopEvent:
35+
async def return_joke(self, ev: JokeEvent) -> RewriteJoke:
36+
return RewriteJoke(joke=ev.joke + "What is funny?")
37+
38+
@step()
39+
async def critique_joke(self, ev: RewriteJoke) -> StopEvent:
3340
joke = ev.joke
3441

3542
prompt = f"Give a thorough analysis and critique of the following joke: {joke}"

literalai/exporter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
from literalai.prompt_engineering.prompt import PromptDict
1414

1515

16+
# TODO: Suppport Gemini models https://github.com/traceloop/openllmetry/issues/2419
17+
# TODO: Support llamaindex workflow https://github.com/traceloop/openllmetry/pull/2421
1618
class LoggingSpanExporter(SpanExporter):
1719
def __init__(
1820
self,
@@ -57,8 +59,6 @@ def force_flush(self, timeout_millis: float = 30000) -> bool:
5759
"""Force flush the exporter."""
5860
return True
5961

60-
# TODO: error check with gemini error
61-
# TODO: ttFirstToken
6262
def _create_step_from_span(self, span: ReadableSpan) -> Step:
6363
"""Convert a span to a Step object"""
6464
attributes = span.attributes or {}

0 commit comments

Comments
 (0)