Skip to content

Delete Persona

The Tror Gen AI SDK allows you to delete personas that are no longer required within your application (Note: Persona management is an optional feature). This section guides you through the process of removing a persona, ensuring you can maintain an organized set of personas for your chat interactions.

When to Delete Personas?

  • Evolving Needs: As your application or brand voice changes, you might have personas that no longer align with your requirements. Deleting these personas helps keep your persona collection focused and relevant.

  • Unused Personas: If you've created personas that are not actively used in your chats, deleting them can declutter your persona management list.

Removing a Persona:

The delete_persona function within the SDK lets you remove a persona. Here's what you need to know:

  • Argument: The function requires one argument, personaid (str), which is the id of the persona you want to delete.

import trorgenai

persona_to_delete = "adcd57c1-ac12-43de-b38a-5155b81a3d8a"
llm_app_sdk.delete_persona(persona_to_delete)

This code snippet removes the persona id "adcd57c1-ac12-43de-b38a-5155b81a3d8a" from your application.

Keeping Your Personas Organized:

By strategically deleting unused personas, you can maintain a well-organized and relevant persona collection within your application. This simplifies persona selection during chat development and ensures a consistent user experience.

By effectively managing your personas through creation, deletion, and updates, you can ensure that your chat interactions consistently deliver a tailored and engaging user experience.