Skip to content

Commit 3ccebcd

Browse files
author
Pierre
committed
rename result to run in README
1 parent 1663b2c commit 3ccebcd

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -154,16 +154,16 @@ feedback_input = CallFeedbackInput(
154154
)
155155

156156
# Analyze the feedback
157-
result = await analyze_call_feedback(feedback_input)
157+
run = await analyze_call_feedback(feedback_input)
158158

159159
# Print the analysis
160160
print("\nPositive Points:")
161-
for point in result.positive_points:
161+
for point in run.positive_points:
162162
print(f"\n{point.point}")
163163
print(f" Quote [{point.timestamp}]: \"{point.quote}\"")
164164

165165
print("\nNegative Points:")
166-
for point in result.negative_points:
166+
for point in run.negative_points:
167167
print(f"\n{point.point}")
168168
print(f" Quote [{point.timestamp}]: \"{point.quote}\"")
169169
```
@@ -590,7 +590,7 @@ async def analyze_call_feedback_strict(input: CallFeedbackInput) -> CallFeedback
590590
...
591591

592592
try:
593-
result = await analyze_call_feedback_strict(
593+
run = await analyze_call_feedback_strict(
594594
CallFeedbackInput(
595595
transcript="[00:01:15] Customer: The product is great!",
596596
call_date=date(2024, 1, 15)
@@ -608,13 +608,13 @@ async def analyze_call_feedback_tolerant(input: CallFeedbackInput) -> CallFeedba
608608
...
609609

610610
# The invalid_generation is less likely
611-
result = await analyze_call_feedback_tolerant(
611+
run = await analyze_call_feedback_tolerant(
612612
CallFeedbackInput(
613613
transcript="[00:01:15] Customer: The product is great!",
614614
call_date=date(2024, 1, 15)
615615
)
616616
)
617-
if not result.positive_points and not result.negative_points:
617+
if not run.positive_points and not run.negative_points:
618618
print("No feedback points were generated!")
619619
```
620620

@@ -630,15 +630,14 @@ absent will cause `AttributeError` when queried.
630630
async def analyze_call_feedback_stream(input: CallFeedbackInput) -> AsyncIterator[CallFeedbackOutput]:
631631
...
632632

633-
async for result in analyze_call_feedback_stream(
633+
async for run in analyze_call_feedback_stream(
634634
CallFeedbackInput(
635635
transcript="[00:01:15] Customer: The product is great!",
636636
call_date=date(2024, 1, 15)
637637
)
638638
):
639-
# With default values, we can safely check the points as they stream in
640-
print(f"Positive points so far: {len(result.positive_points)}")
641-
print(f"Negative points so far: {len(result.negative_points)}")
639+
print(f"Positive points so far: {len(run.positive_points)}")
640+
print(f"Negative points so far: {len(run.negative_points)}")
642641
```
643642

644643
#### Field properties

0 commit comments

Comments
 (0)