@AnylineComponent(value="anyline.environment.data.driver.actuator.dify") public class DifyActuator extends Object implements DriverActuator
log| 构造器和说明 |
|---|
DifyActuator() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addMetadata(DifyRuntime runtime,
org.anyline.metadata.Table table,
Metadata metadata)
知识库添加 元数据定义,添加完成后返回元数据id
|
<T extends org.anyline.metadata.Metadata> |
checkSchema(DriverAdapter adapter,
DataRuntime runtime,
Connection con,
T meta) |
<T extends org.anyline.metadata.Metadata> |
checkSchema(DriverAdapter adapter,
DataRuntime runtime,
DataSource datasource,
T meta) |
<T extends org.anyline.metadata.Metadata> |
checkSchema(DriverAdapter adapter,
DataRuntime runtime,
T meta) |
long |
execute(DriverAdapter adapter,
DataRuntime runtime,
String random,
ConfigStore configs,
Run run) |
org.anyline.entity.DataRow |
get(DifyRuntime runtime,
String url,
Map<String,Object> params) |
Connection |
getConnection(DriverAdapter adapter,
DataRuntime runtime,
DataSource datasource) |
DataSource |
getDataSource(DriverAdapter adapter,
DataRuntime runtime) |
protected Map<String,String> |
header(DifyRuntime runtime) |
long |
insert(DriverAdapter adapter,
DataRuntime runtime,
String random,
Object data,
ConfigStore configs,
Run run,
String generatedKey,
String[] pks) |
Map<String,Object> |
map(DriverAdapter adapter,
DataRuntime runtime,
String random,
ConfigStore configs,
Run run) |
List<Map<String,Object>> |
maps(DriverAdapter adapter,
DataRuntime runtime,
String random,
ConfigStore configs,
Run run) |
org.anyline.entity.DataRow |
post(DifyRuntime runtime,
String url,
Map<String,Object> params) |
void |
post(DifyRuntime runtime,
String url,
Map<String,Object> params,
File file) |
String |
product(DriverAdapter adapter,
DataRuntime runtime,
boolean create,
String product) |
void |
releaseConnection(DriverAdapter adapter,
DataRuntime runtime,
Connection connection,
DataSource datasource) |
org.anyline.entity.DataSet |
select(DriverAdapter adapter,
DataRuntime runtime,
String random,
boolean system,
org.anyline.metadata.ACTION.DML action,
org.anyline.metadata.Table table,
ConfigStore configs,
Run run,
String cmd,
List<Object> values,
LinkedHashMap<String,org.anyline.metadata.Column> columns) |
boolean |
setMetadata(DifyRuntime runtime,
org.anyline.metadata.Table table,
Document document) |
boolean |
setMetadata(DifyRuntime runtime,
org.anyline.metadata.Table table,
List<Document> documents)
设计文档元数据,所有元数据一次性设置,之前设置过的会被覆盖
注意元数据id需要跟设置知识库元数据时返回的id保持一致
|
Class<? extends DriverAdapter> |
supportAdapterType() |
<T extends org.anyline.metadata.Table> |
tables(DriverAdapter adapter,
DataRuntime runtime,
boolean create,
List<T> previous,
org.anyline.metadata.Table query,
int types)
table[结果集封装]
根据驱动内置方法补充 |
long |
update(DriverAdapter adapter,
DataRuntime runtime,
String random,
org.anyline.metadata.Table dest,
Object data,
ConfigStore configs,
Run run) |
org.anyline.entity.DataRow |
upload(DifyRuntime runtime,
String url,
Document document,
Map<String,Object> params)
根据文件 创建知识库文档
|
String |
version(DriverAdapter adapter,
DataRuntime runtime,
boolean create,
String version) |
public Class<? extends DriverAdapter> supportAdapterType()
supportAdapterType 在接口中 DriverActuatorpublic DataSource getDataSource(DriverAdapter adapter, DataRuntime runtime)
getDataSource 在接口中 DriverActuatorpublic Connection getConnection(DriverAdapter adapter, DataRuntime runtime, DataSource datasource)
getConnection 在接口中 DriverActuatorpublic void releaseConnection(DriverAdapter adapter, DataRuntime runtime, Connection connection, DataSource datasource)
releaseConnection 在接口中 DriverActuatorpublic <T extends org.anyline.metadata.Metadata> void checkSchema(DriverAdapter adapter, DataRuntime runtime, DataSource datasource, T meta)
checkSchema 在接口中 DriverActuatorpublic <T extends org.anyline.metadata.Metadata> void checkSchema(DriverAdapter adapter, DataRuntime runtime, T meta)
checkSchema 在接口中 DriverActuatorpublic <T extends org.anyline.metadata.Metadata> void checkSchema(DriverAdapter adapter, DataRuntime runtime, Connection con, T meta)
checkSchema 在接口中 DriverActuatorpublic String product(DriverAdapter adapter, DataRuntime runtime, boolean create, String product)
product 在接口中 DriverActuatorpublic String version(DriverAdapter adapter, DataRuntime runtime, boolean create, String version)
version 在接口中 DriverActuatorpublic org.anyline.entity.DataSet select(DriverAdapter adapter, DataRuntime runtime, String random, boolean system, org.anyline.metadata.ACTION.DML action, org.anyline.metadata.Table table, ConfigStore configs, Run run, String cmd, List<Object> values, LinkedHashMap<String,org.anyline.metadata.Column> columns) throws Exception
select 在接口中 DriverActuatorExceptionpublic List<Map<String,Object>> maps(DriverAdapter adapter, DataRuntime runtime, String random, ConfigStore configs, Run run) throws Exception
maps 在接口中 DriverActuatorExceptionpublic Map<String,Object> map(DriverAdapter adapter, DataRuntime runtime, String random, ConfigStore configs, Run run) throws Exception
map 在接口中 DriverActuatorExceptionpublic long insert(DriverAdapter adapter, DataRuntime runtime, String random, Object data, ConfigStore configs, Run run, String generatedKey, String[] pks) throws Exception
insert 在接口中 DriverActuatorExceptionpublic long update(DriverAdapter adapter, DataRuntime runtime, String random, org.anyline.metadata.Table dest, Object data, ConfigStore configs, Run run) throws Exception
update 在接口中 DriverActuatorExceptionpublic long execute(DriverAdapter adapter, DataRuntime runtime, String random, ConfigStore configs, Run run) throws Exception
execute 在接口中 DriverActuatorExceptionpublic org.anyline.entity.DataRow upload(DifyRuntime runtime, String url, Document document, Map<String,Object> params) throws Exception
url - urldocument - 文档params - 参数Exception - 异常public void addMetadata(DifyRuntime runtime, org.anyline.metadata.Table table, Metadata metadata) throws Exception
table - 知识库metadata - 元数据Exception - 异常public boolean setMetadata(DifyRuntime runtime, org.anyline.metadata.Table table, List<Document> documents)
table - 知识库(id)documents - 文档列表public boolean setMetadata(DifyRuntime runtime, org.anyline.metadata.Table table, Document document)
public <T extends org.anyline.metadata.Table> List<T> tables(DriverAdapter adapter, DataRuntime runtime, boolean create, List<T> previous, org.anyline.metadata.Table query, int types) throws Exception
tables 在接口中 DriverActuatorruntime - 运行环境主要包含驱动适配器 数据源或客户端create - 上一步没有查到的,这一步是否需要新创建previous - 上一步查询结果query - 查询条件 根据metadata属性types - 查询的类型 参考 Table.TYPE 多个类型相加算出总和Exception - 异常public org.anyline.entity.DataRow post(DifyRuntime runtime, String url, Map<String,Object> params) throws Exception
Exceptionpublic org.anyline.entity.DataRow get(DifyRuntime runtime, String url, Map<String,Object> params) throws Exception
Exceptionprotected Map<String,String> header(DifyRuntime runtime)
Copyright © 2025. All rights reserved.