Skip to content

Commit

Permalink
Apply latest Black, refs #400
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Jan 26, 2024
1 parent d9d5c72 commit 2c87a6a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
16 changes: 10 additions & 6 deletions llm/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -746,12 +746,16 @@ def logs_list(
click.echo(
"# {}{}\n{}".format(
row["datetime_utc"].split(".")[0],
" conversation: {}".format(row["conversation_id"])
if should_show_conversation
else "",
"\nModel: **{}**\n".format(row["model"])
if should_show_conversation
else "",
(
" conversation: {}".format(row["conversation_id"])
if should_show_conversation
else ""
),
(
"\nModel: **{}**\n".format(row["model"])
if should_show_conversation
else ""
),
)
)
# In conversation log mode only show it for the first one
Expand Down
12 changes: 6 additions & 6 deletions llm/embeddings.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,12 @@ def embed_multi_with_metadata(
"collection_id": collection_id,
"id": id,
"embedding": llm.encode(embedding),
"content": value
if (store and isinstance(value, str))
else None,
"content_blob": value
if (store and isinstance(value, bytes))
else None,
"content": (
value if (store and isinstance(value, str)) else None
),
"content_blob": (
value if (store and isinstance(value, bytes)) else None
),
"content_hash": self.content_hash(value),
"metadata": json.dumps(metadata) if metadata else None,
"updated": int(time.time()),
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def get_long_description():
"pytest-httpx",
"cogapp",
"mypy",
"black",
"black>=24.1.0",
"ruff",
"types-click",
"types-PyYAML",
Expand Down

0 comments on commit 2c87a6a

Please sign in to comment.