这是indexloc提供的服务,不要输入任何密码

katkode_ai_manager 0.0.3 copy "katkode_ai_manager: ^0.0.3" to clipboard
katkode_ai_manager: ^0.0.3 copied to clipboard

A flutter library to let users use their own LLM keys to access AI models

katkode_ai_manager #

pub package

A flutter library to let users use their own LLM keys to access AI models

Sponsors #

Consider supporting this project by becoming a sponsor. Your logo will show up here with a link to your website.

How to use #

To use this plugin, add katkode_ai_manager as a dependency in your pubspec.yaml file.

Add a new model to the store:

    AIModel aiModel = await ManagerAI.createAIModel(
      AiModelType.gemini,
      "xxx",
    );

    bool testResult = await aiModel.testModel();

    if (testResult) {
      await ManagerAI.addModel(aiModel);
      // Success
    } else {
      // Fail
    }

To use the model:

    AIModel? aiModel = await ManagerAI.getDefaultModel();
    String? aiResponse = await aiModel.getTextAndDocumentCompletion(
        "This is an exmaple prompt",
        [], // file bytes list
    );

How it works #

Uses the LLM API to access the AI models.

FAQ #

How do I add additional AI model types? #

Send a pull request with the new AI model and the corresponding test.

3
likes
130
points
54
downloads

Publisher

verified publisherkatkode.com

Weekly Downloads

A flutter library to let users use their own LLM keys to access AI models

Homepage
Repository (GitHub)

Topics

#katkode #ai-manager #ai-store #ai-key-store #llm-key-store

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_gemini, path, path_provider, sembast, sembast_web, url_launcher, uuid

More

Packages that depend on katkode_ai_manager