2 Star 9 Fork 6

tencentcloud/tencentcloud-sdk-nodejs

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
lkeap.v20240522.test.js 7.25 KB
一键复制 编辑 原始数据 按行查看 历史
tencentcloud 提交于 2025-05-21 04:20 +08:00 . release 4.1.42
const expect = require("chai").expect
const tencentcloud = require("../../tencentcloud-sdk-nodejs")
const client = new tencentcloud.lkeap.v20240522.Client({
credential: {
secretId: process.env.secretId,
secretKey: process.env.secretKey,
},
region: "ap-shanghai",
profile: {
signMethod: "TC3-HMAC-SHA256",
httpProfile: {
reqMethod: "POST",
reqTimeout: 30,
endpoint: "cvm.ap-shanghai.tencentcloudapi.com",
},
},
})
describe("lkeap.v20240522.test.js", function () {
it("lkeap.v20240522.RetrieveKnowledge", async function () {
try {
const data = await client.RetrieveKnowledge({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("lkeap.v20240522.ModifyQA", async function () {
try {
const data = await client.ModifyQA({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("lkeap.v20240522.GetReconstructDocumentResult", async function () {
try {
const data = await client.GetReconstructDocumentResult({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("lkeap.v20240522.RetrieveKnowledgeRealtime", async function () {
try {
const data = await client.RetrieveKnowledgeRealtime({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("lkeap.v20240522.GetSplitDocumentResult", async function () {
try {
const data = await client.GetSplitDocumentResult({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("lkeap.v20240522.DescribeDoc", async function () {
try {
const data = await client.DescribeDoc({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("lkeap.v20240522.ReconstructDocumentSSE", async function () {
try {
const data = await client.ReconstructDocumentSSE({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("lkeap.v20240522.DeleteDocs", async function () {
try {
const data = await client.DeleteDocs({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("lkeap.v20240522.DeleteQAs", async function () {
try {
const data = await client.DeleteQAs({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("lkeap.v20240522.QueryRewrite", async function () {
try {
const data = await client.QueryRewrite({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("lkeap.v20240522.GetEmbedding", async function () {
try {
const data = await client.GetEmbedding({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("lkeap.v20240522.ModifyAttributeLabel", async function () {
try {
const data = await client.ModifyAttributeLabel({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("lkeap.v20240522.RunRerank", async function () {
try {
const data = await client.RunRerank({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("lkeap.v20240522.ListQAs", async function () {
try {
const data = await client.ListQAs({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("lkeap.v20240522.DeleteAttributeLabels", async function () {
try {
const data = await client.DeleteAttributeLabels({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("lkeap.v20240522.CreateAttributeLabel", async function () {
try {
const data = await client.CreateAttributeLabel({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("lkeap.v20240522.CreateReconstructDocumentFlow", async function () {
try {
const data = await client.CreateReconstructDocumentFlow({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("lkeap.v20240522.ListAttributeLabels", async function () {
try {
const data = await client.ListAttributeLabels({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("lkeap.v20240522.ListDocs", async function () {
try {
const data = await client.ListDocs({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("lkeap.v20240522.CreateKnowledgeBase", async function () {
try {
const data = await client.CreateKnowledgeBase({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("lkeap.v20240522.ImportQAs", async function () {
try {
const data = await client.ImportQAs({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("lkeap.v20240522.CreateQA", async function () {
try {
const data = await client.CreateQA({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("lkeap.v20240522.DeleteKnowledgeBase", async function () {
try {
const data = await client.DeleteKnowledgeBase({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("lkeap.v20240522.CreateSplitDocumentFlow", async function () {
try {
const data = await client.CreateSplitDocumentFlow({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("lkeap.v20240522.GetCharacterUsage", async function () {
try {
const data = await client.GetCharacterUsage({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("lkeap.v20240522.UploadDoc", async function () {
try {
const data = await client.UploadDoc({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("lkeap.v20240522.ChatCompletions", async function () {
try {
const data = await client.ChatCompletions({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
})
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/tencentcloud/tencentcloud-sdk-nodejs.git
git@gitee.com:tencentcloud/tencentcloud-sdk-nodejs.git
tencentcloud
tencentcloud-sdk-nodejs
tencentcloud-sdk-nodejs
4.1.43

搜索帮助