Skip to content

Conversation

Aya-Abdellatif
Copy link

This PR introduces CustomTextGenerator

A new text generation class that allows users to define their own text generation function. This enables custom logic for generating text, making Lida more flexible for various use cases.

Changes Introduced

  • New CustomTextGenerator Class
    • Accepts a text_generation_function: Callable[[str], str] to generate text based on a user-defined function.
    • Implements caching to reuse previously generated responses.
    • Includes token counting functionality via num_tokens_from_messages().

Why This is Useful

  • Enables custom text generation logic beyond built-in providers.
  • Improves flexibility for users integrating external models or APIs.

@Aya-Abdellatif
Copy link
Author

@microsoft-github-policy-service agree

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.

1 participant