Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

async methods added in the library #211

Merged
merged 5 commits into from
Nov 29, 2024

Conversation

M-Naveed-Ashraf
Copy link
Contributor

No description provided.

@M-Naveed-Ashraf M-Naveed-Ashraf self-assigned this Nov 11, 2024
@M-Naveed-Ashraf M-Naveed-Ashraf linked an issue Nov 11, 2024 that may be closed by this pull request
@buckyroberts
Copy link
Contributor

Getting an error running the non-async .run()

Screenshot 2024-11-12 at 12 06 59 PM
/Users/bucky/Desktop/Projects/prompt-layer-library/venv/bin/python /Users/bucky/Desktop/Projects/prompt-layer-library/samples/run.py 
Traceback (most recent call last):
  File "/Users/bucky/Desktop/Projects/prompt-layer-library/samples/run.py", line 10, in <module>
    response = pl.run(
               ^^^^^^^
  File "/Users/bucky/Desktop/Projects/prompt-layer-library/promptlayer/promptlayer.py", line 209, in run
    result = self._run_internal(
             ^^^^^^^^^^^^^^^^^^^
  File "/Users/bucky/Desktop/Projects/prompt-layer-library/promptlayer/promptlayer.py", line 145, in _run_internal
    request_log = self._track_request_log(
                  ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bucky/Desktop/Projects/prompt-layer-library/promptlayer/promptlayer.py", line 171, in _track_request_log
    track_request_kwargs = self._prepare_track_request_kwargs(
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bucky/Desktop/Projects/prompt-layer-library/promptlayer/promptlayer_mixins.py", line 217, in _prepare_track_request_kwargs
    "function_name": request_params["function_name"],
                     ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable

Process finished with exit code 1

Comment on lines 155 to 156
config = None
request_function = None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are unused:

        config = None
        request_function = None

@M-Naveed-Ashraf M-Naveed-Ashraf force-pushed the 208-finish-up-async-python-library-stuff branch 2 times, most recently from 393d296 to 3dbf20d Compare November 28, 2024 18:17
@Jped
Copy link
Contributor

Jped commented Nov 28, 2024

I just tested this out with the regular run method

Using this version makes my tracked request blank. I switched to the current main branch code and it works normally.

Screenshot 2024-11-28 at 2 33 15 PM
Screenshot 2024-11-28 at 2 33 18 PM

@M-Naveed-Ashraf M-Naveed-Ashraf force-pushed the 208-finish-up-async-python-library-stuff branch from bb8f82d to 9e26d62 Compare November 29, 2024 03:37
@M-Naveed-Ashraf M-Naveed-Ashraf merged commit 6b76200 into master Nov 29, 2024
3 checks passed
@M-Naveed-Ashraf M-Naveed-Ashraf deleted the 208-finish-up-async-python-library-stuff branch November 29, 2024 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

finish up async python library stuff
3 participants