MagnivOrg / prompt-layer-library

🍰 PromptLayer - Maintain a log of your prompts and OpenAI API requests. Track, debug, and replay old completions.
https://www.promptlayer.com
Apache License 2.0
477 stars 42 forks source link

prompts.all() fails silently #89

Closed PFacheris closed 8 months ago

PFacheris commented 8 months ago

Attempting to list all prompts simply prints 'items' if the API key is not set due to the KeyError.

https://github.com/MagnivOrg/prompt-layer-library/blob/master/promptlayer/prompts/prompts.py#L80-L83

This should likely be raising an exception so that it can be handled by the caller.

Jped commented 8 months ago

@PFacheris just fixed it, thanks for pointing this out!