WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 3 additions & 15 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.290
rev: v0.9.0
hooks:
- id: ruff
args:
[--exclude, features, --ignore, "E501", --fix, --exit-non-zero-on-fix]

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.9.1
hooks:
- id: black
args: [--force-exclude, features]

- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
args: [--profile, black, --skip, features, --filter-files]
[--exclude, features, --ignore, "E501", --fix, --exit-non-zero-on-fix, --select, "E,F,I"]
- id: ruff-format
2 changes: 1 addition & 1 deletion promptlayer/promptlayer_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def __getattr__(self, name):
):
return PromptLayerBase(
attr,
function_name=f'{object.__getattribute__(self, "_function_name")}.{name}',
function_name=f"{object.__getattribute__(self, '_function_name')}.{name}",
provider_type=object.__getattribute__(self, "_provider_type"),
api_key=object.__getattribute__(self, "_api_key"),
tracer=object.__getattribute__(self, "_tracer"),
Expand Down
Empty file added promptlayer/py.typed
Empty file.
3 changes: 1 addition & 2 deletions promptlayer/track/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from promptlayer.track.track import agroup, ametadata, aprompt, ascore, group
from promptlayer.track.track import agroup, ametadata, aprompt, ascore, group, prompt
from promptlayer.track.track import metadata as metadata_
from promptlayer.track.track import prompt
from promptlayer.track.track import score as score_


Expand Down
6 changes: 3 additions & 3 deletions promptlayer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -748,9 +748,9 @@ def cleaned_result(self):
hasattr(result.choices[0].delta, "content")
and result.choices[0].delta.content is not None
):
response["content"] = response[
"content"
] = f"{response['content']}{result.choices[0].delta.content}"
response["content"] = response["content"] = (
f"{response['content']}{result.choices[0].delta.content}"
)
final_result = deepcopy(self.results[-1])
final_result.choices[0] = response
return final_result
Expand Down