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

feat: add warning messages when getting deleted promp #156

Merged
merged 7 commits into from
Jan 9, 2025

Conversation

Matthieu-OD
Copy link
Contributor

@Matthieu-OD Matthieu-OD commented Dec 13, 2024

To test

  • get or create or get prompt version or prompt lineage where the prompt lineage has been deleted which means that the value of the field deletedAt is not null

after adding the dev version of the repo as a dependency you can use this code to test it

from literalai import LiteralClient

literalai_client = LiteralClient(
    url="http://localhost:3000", api_key="my-initial-api-key"
)

def get_prompt():
    prompt = literalai_client.api.get_prompt(name="Default", version=2)
    prompt2 = literalai_client.api.get_or_create_prompt(
        name="Default", template_messages=[]
    )
    prompt_lineage = literalai_client.api.get_or_create_prompt_lineage(name="Default")
    print("prompt", prompt)
    print("prompt2", prompt2)
    print("prompt lineage", prompt_lineage)

if __name__ == "__main__":
    get_prompt()

@Matthieu-OD Matthieu-OD force-pushed the matt/eng-2178-allow-prompt-deletion branch from 6f5150e to accecf0 Compare December 16, 2024 13:44
@Matthieu-OD Matthieu-OD force-pushed the matt/eng-2178-allow-prompt-deletion branch from 37b2b82 to f66e151 Compare December 19, 2024 17:46
@Matthieu-OD Matthieu-OD force-pushed the matt/eng-2178-allow-prompt-deletion branch from f66e151 to c9f7514 Compare December 19, 2024 17:48
@Matthieu-OD Matthieu-OD marked this pull request as ready for review December 19, 2024 17:56
@willydouhard willydouhard merged commit 9608e6c into main Jan 9, 2025
2 checks passed
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.

2 participants