@re-ai/volc-knowledge
Version:
火山引擎知识库接口接入SDK
75 lines (74 loc) • 2.93 kB
JavaScript
;
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.KnowledgeImpl = void 0;
const consts_1 = require("../consts");
const request_1 = require("../utils/request");
class KnowledgeImpl {
create(knowledgeData) {
return __awaiter(this, void 0, void 0, function* () {
// TODO: 实现具体逻辑
throw new Error('Method not implemented.');
});
}
update(knowledgeId, updateData) {
return __awaiter(this, void 0, void 0, function* () {
// TODO: 实现具体逻辑
throw new Error('Method not implemented.');
});
}
delete(knowledgeId) {
return __awaiter(this, void 0, void 0, function* () {
// TODO: 实现具体逻辑
throw new Error('Method not implemented.');
});
}
info(knowledgeId) {
return __awaiter(this, void 0, void 0, function* () {
// TODO: 实现具体逻辑
throw new Error('Method not implemented.');
});
}
list(params) {
return __awaiter(this, void 0, void 0, function* () {
return (0, request_1.request)({
pathname: consts_1.KNOWLEDGE_API_PATHS.COLLECTION_LIST,
method: 'POST',
body: params || {},
});
});
}
search(query, params) {
return __awaiter(this, void 0, void 0, function* () {
// TODO: 实现搜索逻辑
throw new Error('Method not implemented.');
});
}
searchAndGenerate(query, params) {
return __awaiter(this, void 0, void 0, function* () {
// TODO: 实现搜索并生成逻辑
throw new Error('Method not implemented.');
});
}
searchKnowledge(query, options) {
return __awaiter(this, void 0, void 0, function* () {
// TODO: 实现搜索知识库逻辑
throw new Error('Method not implemented.');
});
}
chatCompletions(messages, options) {
return __awaiter(this, void 0, void 0, function* () {
// TODO: 实现聊天逻辑
throw new Error('Method not implemented.');
});
}
}
exports.KnowledgeImpl = KnowledgeImpl;