Skip to content

Commit

Permalink
Apply black formatting to fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
1 parent f285c20 commit 0d5703f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions examples/poem-generation/poem.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,14 @@ class Poems(BaseModel):
# Type alias for input/output types
_DictOrBaseModel = Union[Dict[str, Any], BaseModel]


def parse_poems(row: _DictOrBaseModel, poems: _DictOrBaseModel) -> _DictOrBaseModel:
"""Parse the poems from the LLM response.
Args:
row: The input row containing the topic
poems: The structured output from the LLM (Poems model)
Returns:
A list of dictionaries containing the topic and poem
"""
Expand Down
2 changes: 1 addition & 1 deletion src/bespokelabs/curator/llm/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def __call__(

def _get_function_hash(func) -> str:
"""Get a hash of a function's source code.
Uses cloudpickle to properly handle functions with type annotations and closure variables.
"""
if func is None:
Expand Down
8 changes: 4 additions & 4 deletions tests/test_prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ def test_single_completion_batch(prompter: LLM):
# Create a prompter with batch=True
def simple_prompt_func(row: _DictOrBaseModel) -> _DictOrBaseModel:
"""Generate a simple prompt for testing.
Args:
row: The input row (unused in this test)
Returns:
A list of messages for the LLM
"""
Expand Down Expand Up @@ -155,10 +155,10 @@ def test_single_completion_no_batch(prompter: LLM):
# Create a prompter without batch parameter
def simple_prompt_func(row: _DictOrBaseModel) -> _DictOrBaseModel:
"""Generate a simple prompt for testing.
Args:
row: The input row (unused in this test)
Returns:
A list of messages for the LLM
"""
Expand Down

0 comments on commit 0d5703f

Please sign in to comment.