Skip to content
This repository has been archived by the owner on Jan 12, 2025. It is now read-only.

Commit

Permalink
Ok (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
hughcrt authored Dec 3, 2024
1 parent 4ca43cc commit d802e14
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions lunary/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ def get_parent_run_id(parent_run_id: str, run_type: str, app_id: str, run_id: st
if parent_run_id == "None":
parent_run_id = None



parent_from_ctx = get_parent()
if parent_from_ctx and run_type != "thread":
return str(create_uuid_from_string(str(parent_from_ctx) + str(app_id)))
Expand Down Expand Up @@ -353,7 +351,7 @@ def wrap(
def sync_wrapper(*args, **kwargs):
output = None

parent_run_id = run_manager.current_run_id
parent_run_id = kwargs.pop("parent", run_manager.current_run_id)
run = run_manager.start_run(run_id, parent_run_id)

try:
Expand Down Expand Up @@ -447,7 +445,7 @@ async def wrapper(*args, **kwargs):
async def async_wrapper(*args, **kwargs):
output = None

parent_run_id = kwargs.pop("parent", None)
parent_run_id = kwargs.pop("parent", run_manager.current_run_id)
run = run_manager.start_run(parent_run_id=parent_run_id)

try:
Expand Down Expand Up @@ -519,7 +517,7 @@ async def async_wrapper(*args, **kwargs):
run_manager.end_run(run.id)

def async_stream_wrapper(*args, **kwargs):
parent_run_id = kwargs.pop("parent", None)
parent_run_id = kwargs.pop("parent", run_manager.current_run_id)
run = run_manager.start_run(parent_run_id=parent_run_id)

try:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "lunary"
version = "1.2.4-alpha.7"
version = "1.2.5"
description = "Observability, analytics and evaluations for AI agents and chatbots."
authors = ["lunary <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit d802e14

Please sign in to comment.