Skip to content

Client fails to fetch prompts with names containing slash #254

@dali-fathallah

Description

@dali-fathallah

When we create a prompt with the name containing a slash on the UI, example feature1/resolve_problem_2.
The prompt is correctly created in the UI, but the python client fails to fetch it:

client.templates.get(prompt_name="feature1/resolve_problem_2")

Looking at the traces of the error we identify the problem in the
promptlayer/utils.py:918 (see screenshot)

When the url value is being concatenated the prompt_name value is used directly without url encoding leading to creating a new level in the url and the wrong path

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions