{"id":16213586,"url":"https://github.com/arnavk-09/mdb_dart","last_synced_at":"2026-01-27T22:33:16.116Z","repository":{"id":257816785,"uuid":"867799934","full_name":"ArnavK-09/mdb_dart","owner":"ArnavK-09","description":"🎯 MindsAI SDK for Dart for efficient interaction...","archived":false,"fork":false,"pushed_at":"2024-10-18T18:54:12.000Z","size":403,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T07:59:35.673Z","etag":null,"topics":["api","dart","hacktoberfest","mindsdb","mindsdb-dart-sdk","pub","sdk"],"latest_commit_sha":null,"homepage":"https://pub.dev/documentation/mdb_dart","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ArnavK-09.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-04T18:38:44.000Z","updated_at":"2025-04-01T04:48:55.000Z","dependencies_parsed_at":"2024-10-09T16:41:34.289Z","dependency_job_id":"da872722-cfa8-431e-b021-af41bb857a01","html_url":"https://github.com/ArnavK-09/mdb_dart","commit_stats":null,"previous_names":["arnavk-09/mdb_dart"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArnavK-09%2Fmdb_dart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArnavK-09%2Fmdb_dart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArnavK-09%2Fmdb_dart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArnavK-09%2Fmdb_dart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArnavK-09","download_url":"https://codeload.github.com/ArnavK-09/mdb_dart/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247737783,"owners_count":20987721,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","dart","hacktoberfest","mindsdb","mindsdb-dart-sdk","pub","sdk"],"created_at":"2024-10-10T11:06:27.469Z","updated_at":"2026-01-27T22:33:16.082Z","avatar_url":"https://github.com/ArnavK-09.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e🎯 Minds Dart 🎯\u003c/h1\u003e\n\u003cbr /\u003e\n\u003cp align=\"center\"\u003e\n    \u003cimg alt=\"hero\" width=\"450\" src=\"https://raw.githubusercontent.com/ArnavK-09/mdb_dart/refs/heads/main/.github/hero.png\" style=\"max-width: 100%;\"/\u003e\n\u003c/p\u003e\n\u003cbr /\u003e\u003cbr /\u003e\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://pub.dev/packages/mdb_dart\"\u003e\n\u003cimg alt=\"pub verion\" src=\"https://img.shields.io/pub/v/mdb_dart.svg\"\u003e\n\u003c/a\u003e\n    \u003ca href=\"https://pub.dev/packages/mdb_dart\"\u003e\n\u003cimg alt=\"repo size\" src=\"https://img.shields.io/github/repo-size/ArnavK-09/mdb_dart?color=green\"\u003e\n        \u003c/a\u003e    \u003ca href=\"https://github.com/ArnavK-09/mdb_dart/releases\"\u003e\n\u003cimg alt=\"repo release\" src=\"https://img.shields.io/github/v/release/ArnavK-09/mdb_dart\"\u003e   \u003c/a\u003e \n      \u003ca href=\"https://github.com/ArnavK-09/mdb_dart/actions/workflows/tests.yaml\"\u003e\n\u003cimg alt=\"Tests\" src=\"https://github.com/ArnavK-09/mdb_dart/actions/workflows/tests.yaml/badge.svg\"\u003e \u003c/a\u003e \n          \u003ca href=\"https://github.com/ArnavK-09/mdb_dart/blob/main/LICENSE\"\u003e\n\u003cimg alt=\"license\" src=\"https://img.shields.io/badge/License-Mozilla%20Public%20License%202.0-orange.svg\"\u003e \u003c/a\u003e \n\u003c/p\u003e\n\n\u003e [!NOTE]\n\u003e\n\u003e A powerful and intuitive **Dart SDK** for interacting with the [**Minds AI API**](https://mdb.ai). Seamlessly integrate machine learning capabilities into your Dart applications!\n\n## 📚 Table of Contents\n\n- [🚀 Features](#-features)\n- [🎪 Installation](#-installation)\n- [🏁 Getting Started](#-getting-started)\n- [📘 API Reference](#-api-reference)\n  - [Client](#client)\n  - [Datasources](#datasources)\n  - [Minds](#minds)\n  - [Mind](#mind)\n  - [Exceptions](#exceptions)\n- [🌟 Usage Examples](#-usage-examples)\n- [🤝 Contributing](#-contributing)\n- [📄 License](#-license)\n\n---\n\n## 🚀 Features\n\n- **🔐 Secure API Authentication**  \n  Safeguard your application with cutting-edge authentication methods that ensure your connection to the Minds API remains protected and confidential. Experience peace of mind while accessing advanced AI functionalities.\n\n- **📊 Intuitive Data Source Management**  \n  Easily manage and configure your data sources with sdk. Add, modify, or remove data connections effortlessly, allowing your AI models to access the most relevant and up-to-date information.\n\n- **🧠 Tailored AI Model Creation (Minds AI)**  \n  Design bespoke AI models that suit your specific requirements. With our platform, you can create, customize, and optimize Minds that deliver personalized responses, making your applications smarter and more intuitive.\n\n- **🔄 Effortless Minds API Integration**  \n  Experience a hassle-free integration with the Minds API, enabling you to tap into the full spectrum of AI capabilities quickly. Connect your systems and workflows seamlessly, enhancing your application’s functionality.\n\n- **📡 Real-time Interaction Capabilities**  \n  Engage your users in real-time with interactive responses! Our real-time streaming support enables you to build applications that deliver immediate feedback, making conversations more dynamic and engaging.\n\n- **📦 Modular Architecture**  \n  Benefit from a flexible, modular architecture that allows you to extend and customize the functionality of your application easily. Add new features and capabilities as your project evolves, ensuring long-term adaptability.\n\n## 🎪 Installation\n\n\u003e Add **[`mdb_dart`](https://pub.dev/packages/mdb_dart)** to your project!\n\n###### terminal\n\n```bash\ndart pub add mdb_dart\n```\n\n## 🏁 Getting Started\n\nImport the library and create a client:\n\n```dart\nimport 'package:mdb_dart/mdb_dart.dart';\n\nvoid main() async {\n  final client = Client('YOUR_API_KEY');\n  // Now you're ready to use the SDK!!!\n}\n```\n\n\u003e Checkout [`demo`](https://github.com/ArnavK-09/mdb_dart/blob/main/example%2Fmain.dart) code!\n\n---\n\n## 📘 API Reference\n\n### [Client](https://github.com/ArnavK-09/mdb_dart/blob/main/lib/src/client.dart#L32)\n\n| Property                                                                                             | Description                   |\n| ---------------------------------------------------------------------------------------------------- | ----------------------------- |\n| [`RestAPI api`](https://github.com/ArnavK-09/mdb_dart/blob/main/lib/src/client.dart#L34)             | Instance for making API calls |\n| [`Datasources datasources`](https://github.com/ArnavK-09/mdb_dart/blob/main/lib/src/client.dart#L37) | Manages data sources          |\n| [`Minds minds`](https://github.com/ArnavK-09/mdb_dart/blob/main/lib/src/client.dart#L40)             | Manages minds (AI models)     |\n\n### [Datasources](https://github.com/ArnavK-09/mdb_dart/blob/main/lib/src/datasources.dart#L116)\n\n| Method                                                                                                                                     | Description               |\n| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------- |\n| [`list()`](https://github.com/ArnavK-09/mdb_dart/blob/main/lib/src/datasources.dart#L203)                                                  | List all datasources      |\n| [`get(String name)`](https://github.com/ArnavK-09/mdb_dart/blob/main/lib/src/datasources.dart#L247)                                        | Get a specific datasource |\n| [`create(DatabaseConfig dsConfig, {bool replace = false})`](https://github.com/ArnavK-09/mdb_dart/blob/main/lib/src/datasources.dart#L169) | Create a new datasource   |\n| [`drop(String name)`](https://github.com/ArnavK-09/mdb_dart/blob/main/lib/src/datasources.dart#L288)                                       | Delete a datasource       |\n\n### [Datasource](https://github.com/ArnavK-09/mdb_dart/blob/main/lib/src/datasources.dart#L57)\n| Method                                                                                                                                                         | Description                                                                                                                                                           |\n| -------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| [`Datasource({String name, String engine, String description, Map\u003cString, dynamic\u003e? connectionData, List\u003cString\u003e? tables})`](https://github.com/ArnavK-09/mdb_dart/blob/main/lib/src/datasources.dart#L57)                                  | Creates a new `Datasource` instance with required parameters `name`, `engine`, `description`, and optional `connectionData`, `tables`. Inherits from `DatabaseConfig`. |\n| [`fromJson(Map\u003cString, dynamic\u003e json)`](https://github.com/ArnavK-09/mdb_dart/blob/main/lib/src/datasources.dart#L102)                                                                                                                     | Creates a new `Datasource` instance from a JSON map. Inherited fields include `name`, `engine`, `description`, `connectionData`, and `tables`.                         |\n| [`toJson()`](https://github.com/ArnavK-09/mdb_dart/blob/main/lib/src/datasources.dart#L42)                                                                                                                                                | Converts the `Datasource` instance into a JSON-compatible map. Inherited from `DatabaseConfig`.                                                                        |\n\n### [Minds](https://github.com/ArnavK-09/mdb_dart/blob/main/lib/src/minds.dart#L408)\n\n| Method                                                                                                                                                        | Description                    |\n| ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |\n| [`list()`](https://github.com/ArnavK-09/mdb_dart/blob/main/lib/src/minds.dart#L435)                                                                           | List all minds (AI models)     |\n| [`get(String name)`](https://github.com/ArnavK-09/mdb_dart/blob/main/lib/src/minds.dart#L468)                                                                 | Get a specific mind (AI model) |\n| [`create({required String name, modelName, provider, promptTemplate, datasources})`](https://github.com/ArnavK-09/mdb_dart/blob/main/lib/src/minds.dart#L519) | Create a new mind              |\n| [`drop(String name)`](https://github.com/ArnavK-09/mdb_dart/blob/main/lib/src/minds.dart#L583)                                                                | Delete a mind                  |\n\n### [Mind](https://github.com/ArnavK-09/mdb_dart/blob/main/lib/src/minds.dart#L37)\n\n| Method                                                                                                                                                            | Description                                                               |\n| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |\n| [`update({String? name, modelName, provider, promptTemplate, datasources, parameters})`](https://github.com/ArnavK-09/mdb_dart/blob/main/lib/src/minds.dart#L101) | Updates the properties of the mind.                                       |\n| [`addDatasource(dynamic datasource)`](https://github.com/ArnavK-09/mdb_dart/blob/main/lib/src/minds.dart#L161)                                                    | Adds a new datasource to the mind.                                        |\n| [`delDatasource(dynamic datasource)`](https://github.com/ArnavK-09/mdb_dart/blob/main/lib/src/minds.dart#L195)                                                    | Deletes a specific datasource from the mind.                              |\n| [`completion(String message)`](https://github.com/ArnavK-09/mdb_dart/blob/main/lib/src/minds.dart#L238)                                                           | Sends a chat message to the Mind API and retrieves a completion response. |\n| [`streamCompletion(String message)`](https://github.com/ArnavK-09/mdb_dart/blob/main/lib/src/minds.dart#L286)                                                     | Streams chat completions from the Mind API based on a user's message.     |\n| [`fromJson(Client client, Map\u003cString, dynamic\u003e json)`](https://github.com/ArnavK-09/mdb_dart/blob/main/lib/src/minds.dart#L384)                                   | Creates a new instance of Mind from a JSON map.                           |\n| [`toJson()`](https://github.com/ArnavK-09/mdb_dart/blob/main/lib/src/minds.dart#L337)                                                                             | Converts the Mind instance into a JSON map.                               |\n\n### Exceptions\n\n| Exception                                                                                                                                         | Description                                                 |\n| ------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- |\n| [`ObjectNotFound([String message = 'Object not found.'])`](https://github.com/ArnavK-09/mdb_dart/blob/main/lib/src/exceptions.dart#L4)            | Thrown when a requested object cannot be found.             |\n| [`ObjectAlreadyExists([String message = 'Object already exists.'])`](https://github.com/ArnavK-09/mdb_dart/blob/main/lib/src/exceptions.dart#L15) | Thrown when trying to create an object that already exists. |\n| [`ObjectNotSupported([String message = 'Object not supported.'])`](https://github.com/ArnavK-09/mdb_dart/blob/main/lib/src/exceptions.dart#L26)   | Thrown when an unsupported operation is attempted.          |\n| [`Forbidden([String message = 'Access forbidden.'])`](https://github.com/ArnavK-09/mdb_dart/blob/main/lib/src/exceptions.dart#L37)                | Thrown when access is forbidden.                            |\n| [`Unauthorized([String message = 'Unauthorized access.'])`](https://github.com/ArnavK-09/mdb_dart/blob/main/lib/src/exceptions.dart#L48)          | Thrown when access is unauthorized.                         |\n| [`UnknownError([String message = 'An unknown error occurred.'])`](https://github.com/ArnavK-09/mdb_dart/blob/main/lib/src/exceptions.dart#L59)    | Thrown for unspecified errors.                              |\n| [`ValueError(String message)`](https://github.com/ArnavK-09/mdb_dart/blob/main/lib/src/exceptions.dart#L70)                                       | Thrown when a value is invalid or out of range.             |\n\n---\n\n## 🌟 Usage Examples\n\n### 💿 Managing `Datasources`\n\n\u003e #### List Datasources\n\n```dart\nList\u003cDatasource\u003e datasources = await client.datasources.list();\nfor (var ds in datasources) {\n  print('Datasource: ${ds.name}');\n}\n```\n\n\u003e #### Create a Datasource\n\n```dart\nfinal newDatasource = await client.datasources.create(\n  DatabaseConfig(\n    name: 'my_postgres_db',\n    engine: 'postgres',\n    description: 'My PostgreSQL Database',\n    connectionData: {\n      'host': 'localhost',\n      'port': 5432,\n      'user': 'username',\n      'password': 'password',\n      'database': 'mydb',\n    },\n  )\n);\nprint('Created datasource: ${newDatasource.name}');\n```\n\n\u003e #### Get a Datasource\n\n```dart\nDatasource datasource = await client.datasources.get('my_postgres_db');\nprint('Datasource engine: ${datasource.engine}');\n```\n\n\u003e #### Delete a Datasource\n\n```dart\nawait client.datasources.drop('my_postgres_db');\nprint('Datasource deleted successfully');\n```\n\n### 🧠 Managing `Minds`\n\n\u003e #### List Minds\n\n```dart\nList\u003cMind\u003e minds = await client.minds.list();\nfor (var mind in minds) {\n  print('Mind: ${mind.name}');\n}\n```\n\n\u003e #### Create a Mind\n\n```dart\nfinal newMind = await client.minds.create(\n  name: 'my_predictor',\n  modelName: 'gpt-4o',\n  provider: 'openai',\n  promptTemplate: 'Predict the next value: {{input}}',\n  datasources: ['my_postgres_db'],\n);\nprint('Created mind: ${newMind.name}');\n```\n\n\u003e #### Get a Mind\n\n```dart\nMind mind = await client.minds.get('my_predictor');\nprint('Mind model: ${mind.modelName}');\n```\n\n\u003e #### Delete a Mind\n\n```dart\nawait client.minds.drop('my_predictor');\nprint('Mind deleted successfully');\n```\n\n\u003e #### Using a Mind for Predictions\n\n```dart\nMind mind = await client.minds.get('my_predictor');\nfinal completion = await mind.completion('What will be the stock price tomorrow?');\nprint('Prediction: ${completion.choices.first.message.content?.first.text}');\n```\n\n\u003e #### Streaming Completions\n\n```dart\nMind mind = await client.minds.get('my_predictor');\nfinal stream = await mind.streamCompletion('Explain quantum computing');\nawait for (var chunk in stream) {\n  print('Chunk: ${chunk.choices.first.delta.content?.first?.text}');\n}\n```\n\n---\n\n\u003ch2 align=\"center\"\u003e📹 Contributing\u003c/h2\u003e\n\n\u003cp align=\"center\"\u003e\nWe welcome contributions to improve and expand the Minds AI Dart SDK!\nTo get started with contributing, please follow the guidelines outlined in our \u003ca href=\"https://github.com/ArnavK-09/mdb_dart/blob/main/CONTRIBUTING.md\"\u003e\u003cstrong\u003eCONTRIBUTING\u003c/strong\u003e\u003c/a\u003e file.\n\u003c/p\u003e\n\n\u003ch2 align=\"center\"\u003e📄 License\u003c/h2\u003e\n\n\u003cp align=\"center\"\u003e\nThis project is licensed under the \u003ccode\u003eMozilla Public License 2.0\u003c/code\u003e - see the \u003ca href=\"https://github.com/ArnavK-09/mdb_dart/blob/main/LICENSE\"\u003e\u003cstrong\u003eLICENSE\u003c/strong\u003e\u003c/a\u003e file for details.\n\u003c/p\u003e\n\n---\n\n\u003cp align=\"center\"\u003e\n    \u003cstrong\u003eIf you find this project helpful, please give it a ⭐ on GitHub!\u003c/strong\u003e\n\u003c/p\u003e\n\n---\n\n\u003e [!WARNING]\n\u003e\n\u003e _This repository is heavily influenced by the [minds_python_sdk](https://github.com/mindsdb/minds_python_sdk) and mirrors its structure and functionality._\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnavk-09%2Fmdb_dart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farnavk-09%2Fmdb_dart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnavk-09%2Fmdb_dart/lists"}