Skip to content

Commit

Permalink
Track hyperparameters for each LLM function call, too
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackHC committed Nov 11, 2023
1 parent a6a61bd commit 044d3fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion llm_strategy/llm_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ def apply_decorator(f: F_types, decorator) -> F_types:
if not is_not_implemented(f):
raise ValueError("The function must not be implemented.")

specific_llm_function = functools.wraps(f)(decorator(f))
specific_llm_function = track_hyperparameters(functools.wraps(f)(decorator(f)))

return typing.cast(F_types, specific_llm_function)

Expand Down
2 changes: 1 addition & 1 deletion llm_strategy/llm_strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def can_wrap_function_in_llm(f: typing.Callable[P, T]) -> bool:

def llm_strategy(llm: BaseLLM) -> typing.Callable[[T], T]: # noqa: C901
"""
A strategy that implements what ever it decorates (or is called on) using the LLM.
A strategy that implements whatever it decorates (or is called on) using the LLM.
"""

@typing.no_type_check
Expand Down

0 comments on commit 044d3fe

Please sign in to comment.