微信扫码
与创始人交个朋友
我要投稿
MindsDB[1] 提供了一个强大的平台,使得从企业数据构建AI变得更加简单和直观。通过其丰富的集成选项和易于使用的接口,MindsDB能够帮助开发者和企业快速构建和部署AI驱动的应用程序。
通过Docker安装MindsDB,连接数据源,使用AI和ML准备数据,并实现多种用例,详细可参考MindsDB安装说明[2]。
MindsDB支持包括RAG、Agents和自动化AI-data工作流在内的多种用例。下面是一个AI系统部署示例,展示了如何创建一个能够搜索结构化数据的AI代理,包括连接数据源、创建技能、部署会话模型、创建代理和查询代理。
-- Step 1: Connect a data source to MindsDB
CREATE DATABASE data_source
WITH ENGINE = "postgres",
PARAMETERS = {
"user": "demo_user",
"password": "demo_password",
"host": "samples.mindsdb.com",
"port": "5432",
"database": "demo",
"schema": "demo_data"
};
SELECT * FROM data_source.car_sales;
-- Step 2: Create a skill
CREATE SKILL my_skill
USING
type = 'text2sql',
database = 'data_source',
tables = ['car_sales'],
description = 'car sales data of different car types';
SHOW SKILLS;
-- Step 3: Deploy a conversational model
CREATE ML_ENGINE langchain_engine
FROM langchain
USING
openai_api_key = 'your openai-api-key';
CREATE MODEL my_conv_model
PREDICT answer
USING
engine = 'langchain_engine',
model_name = 'gpt-4',
mode = 'conversational',
user_column = 'question',
assistant_column = 'answer',
max_tokens = 100,
temperature = 0,
verbose = True,
prompt_template = 'Answer the user input in a helpful way';
DESCRIBE my_conv_model;
-- Step 4: Create an agent
CREATE AGENT my_agent
USING
model = 'my_conv_model',
skills = ['my_skill'];
SHOW AGENTS;
-- Step 5: Query an agent
SELECT * FROM my_agent WHERE question = 'What is the average price of cars from 2018?';
53AI,企业落地应用大模型首选服务商
产品:大模型应用平台+智能体定制开发+落地咨询服务
承诺:先做场景POC验证,看到效果再签署服务协议。零风险落地应用大模型,已交付160+中大型企业
2024-05-15
2024-04-24
2024-07-10
2024-06-23
2024-07-10
2024-08-04
2024-09-14
2024-07-10
2024-06-19
2024-06-14