Skip to content

Commit

Permalink
fixes: some minor fixes (#1756)
Browse files Browse the repository at this point in the history
  • Loading branch information
shahules786 authored Dec 13, 2024
1 parent 15e7200 commit 14695dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/howtos/customizations/_run_config.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# RunConfig
# Customize timeouts and rate limits

The `RunConfig` allows you to pass in the run parameters to functions like `evaluate()` and `TestsetGenerator.generate()`. Depending on your LLM providers rate limits, SLAs and traffic, controlling these parameters can improve the speed and reliablility of Ragas runs.
The `RunConfig` allows you to pass in the run parameters to functions like `evaluate()` and `TestsetGenerator.generate()`. Depending on your LLM providers rate limits, SLAs and traffic, controlling these parameters can improve the speed and reliability and set failure tolerance of Ragas runs.

How to configure the `RunConfig` in

Expand Down
4 changes: 3 additions & 1 deletion src/ragas/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,11 @@ def parse_run_traces(
prompt_traces = {}
for i, prompt_uuid in enumerate(metric_trace.children):
prompt_trace = traces[prompt_uuid]
output = prompt_trace.outputs.get("output", {})
output = output[0] if isinstance(output, list) else output
prompt_traces[f"{prompt_trace.name}"] = {
"input": prompt_trace.inputs.get("data", {}),
"output": prompt_trace.outputs.get("output", {})[0],
"output": output,
}
metric_traces[f"{metric_trace.name}"] = prompt_traces
parased_traces.append(metric_traces)
Expand Down

0 comments on commit 14695dd

Please sign in to comment.