-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into cd/deb
- Loading branch information
Showing
17 changed files
with
1,446 additions
and
2,422 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...mKnowledgeAction_1738700253695/CustomKnowledgeAction_1738700253695.genAiFunction-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<GenAiFunction xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<description>Answers questions about company policies and procedures, troubleshooting steps, or product information. For example: “What is your return policy?” “How do I fix an issue?” or “What features does a product have?”</description> | ||
<invocationTarget>knowledgeSearch</invocationTarget> | ||
<invocationTargetType>standardInvocableAction</invocationTargetType> | ||
<isConfirmationRequired>false</isConfirmationRequired> | ||
<masterLabel>CustomKnowledgeAction_1738700253695</masterLabel> | ||
</GenAiFunction> |
53 changes: 53 additions & 0 deletions
53
...fy-md-files.expected/genAiFunctions/CustomKnowledgeAction_1738700253695/input/schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"required": ["query"], | ||
"unevaluatedProperties": false, | ||
"properties": { | ||
"query": { | ||
"title": "Query", | ||
"description": "Required. A string created by generative AI to be used in the knowledge article search.", | ||
"const": "", | ||
"lightning:type": "lightning__textType", | ||
"lightning:isPII": false, | ||
"copilotAction:isUserInput": true | ||
}, | ||
"citationsUrl": { | ||
"title": "Citations Url", | ||
"description": "The URL to use for citations for custom Agents.", | ||
"const": "", | ||
"lightning:type": "lightning__textType", | ||
"lightning:isPII": false, | ||
"copilotAction:isUserInput": true | ||
}, | ||
"ragFeatureConfigId": { | ||
"title": "RAG Feature Configuration Id", | ||
"description": "The RAG Feature ID to use for grounding this copilot action invocation.", | ||
"const": "", | ||
"lightning:type": "lightning__textType", | ||
"lightning:isPII": false, | ||
"copilotAction:isUserInput": true | ||
}, | ||
"citationsEnabled": { | ||
"title": "Citations Enabled", | ||
"description": "Whether or not citations are enabled.", | ||
"const": false, | ||
"lightning:type": "lightning__booleanType", | ||
"lightning:isPII": false, | ||
"copilotAction:isUserInput": true | ||
}, | ||
"mode": { | ||
"title": "The mode to run in.", | ||
"description": "The mode to use (Professor/Smart/Basic). Determines which prompt template to use.", | ||
"lightning:type": "lightning__textType", | ||
"lightning:isPII": false, | ||
"copilotAction:isUserInput": false | ||
}, | ||
"retrieverMode": { | ||
"title": "The retriever mode to use.", | ||
"description": "The retriever mode to use (Simple/Augmented). Determines whether to do query regeneration", | ||
"lightning:type": "lightning__textType", | ||
"lightning:isPII": false, | ||
"copilotAction:isUserInput": false | ||
} | ||
}, | ||
"lightning:type": "lightning__objectType" | ||
} |
14 changes: 14 additions & 0 deletions
14
...y-md-files.expected/genAiFunctions/CustomKnowledgeAction_1738700253695/output/schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"unevaluatedProperties": false, | ||
"properties": { | ||
"knowledgeSummary": { | ||
"title": "Knowledge Summary", | ||
"description": "A string formatted as rich text that includes a summary of the information retrieved from the knowledge articles and citations to those articles.", | ||
"lightning:type": "lightning__richTextType", | ||
"lightning:isPII": false, | ||
"copilotAction:isDisplayable": true, | ||
"copilotAction:isUsedByPlanner": true | ||
} | ||
}, | ||
"lightning:type": "lightning__objectType" | ||
} |
8 changes: 8 additions & 0 deletions
8
...snapshot/sampleProjects/genAiFunctions/__snapshots__/verify-md-files.expected/package.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Package xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<types> | ||
<members>force-app</members> | ||
<name>GenAiFunction</name> | ||
</types> | ||
<version>59.0</version> | ||
</Package> |
8 changes: 8 additions & 0 deletions
8
...mKnowledgeAction_1738700253695/CustomKnowledgeAction_1738700253695.genAiFunction-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<GenAiFunction xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<description>Answers questions about company policies and procedures, troubleshooting steps, or product information. For example: “What is your return policy?” “How do I fix an issue?” or “What features does a product have?”</description> | ||
<invocationTarget>knowledgeSearch</invocationTarget> | ||
<invocationTargetType>standardInvocableAction</invocationTargetType> | ||
<isConfirmationRequired>false</isConfirmationRequired> | ||
<masterLabel>CustomKnowledgeAction_1738700253695</masterLabel> | ||
</GenAiFunction> |
53 changes: 53 additions & 0 deletions
53
...rce-app/main/default/genAiFunctions/CustomKnowledgeAction_1738700253695/input/schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"required": ["query"], | ||
"unevaluatedProperties": false, | ||
"properties": { | ||
"query": { | ||
"title": "Query", | ||
"description": "Required. A string created by generative AI to be used in the knowledge article search.", | ||
"const": "", | ||
"lightning:type": "lightning__textType", | ||
"lightning:isPII": false, | ||
"copilotAction:isUserInput": true | ||
}, | ||
"citationsUrl": { | ||
"title": "Citations Url", | ||
"description": "The URL to use for citations for custom Agents.", | ||
"const": "", | ||
"lightning:type": "lightning__textType", | ||
"lightning:isPII": false, | ||
"copilotAction:isUserInput": true | ||
}, | ||
"ragFeatureConfigId": { | ||
"title": "RAG Feature Configuration Id", | ||
"description": "The RAG Feature ID to use for grounding this copilot action invocation.", | ||
"const": "", | ||
"lightning:type": "lightning__textType", | ||
"lightning:isPII": false, | ||
"copilotAction:isUserInput": true | ||
}, | ||
"citationsEnabled": { | ||
"title": "Citations Enabled", | ||
"description": "Whether or not citations are enabled.", | ||
"const": false, | ||
"lightning:type": "lightning__booleanType", | ||
"lightning:isPII": false, | ||
"copilotAction:isUserInput": true | ||
}, | ||
"mode": { | ||
"title": "The mode to run in.", | ||
"description": "The mode to use (Professor/Smart/Basic). Determines which prompt template to use.", | ||
"lightning:type": "lightning__textType", | ||
"lightning:isPII": false, | ||
"copilotAction:isUserInput": false | ||
}, | ||
"retrieverMode": { | ||
"title": "The retriever mode to use.", | ||
"description": "The retriever mode to use (Simple/Augmented). Determines whether to do query regeneration", | ||
"lightning:type": "lightning__textType", | ||
"lightning:isPII": false, | ||
"copilotAction:isUserInput": false | ||
} | ||
}, | ||
"lightning:type": "lightning__objectType" | ||
} |
14 changes: 14 additions & 0 deletions
14
...ce-app/main/default/genAiFunctions/CustomKnowledgeAction_1738700253695/output/schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"unevaluatedProperties": false, | ||
"properties": { | ||
"knowledgeSummary": { | ||
"title": "Knowledge Summary", | ||
"description": "A string formatted as rich text that includes a summary of the information retrieved from the knowledge articles and citations to those articles.", | ||
"lightning:type": "lightning__richTextType", | ||
"lightning:isPII": false, | ||
"copilotAction:isDisplayable": true, | ||
"copilotAction:isUsedByPlanner": true | ||
} | ||
}, | ||
"lightning:type": "lightning__objectType" | ||
} |
8 changes: 8 additions & 0 deletions
8
...mKnowledgeAction_1738700253695/CustomKnowledgeAction_1738700253695.genAiFunction-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<GenAiFunction xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<description>Answers questions about company policies and procedures, troubleshooting steps, or product information. For example: “What is your return policy?” “How do I fix an issue?” or “What features does a product have?”</description> | ||
<invocationTarget>knowledgeSearch</invocationTarget> | ||
<invocationTargetType>standardInvocableAction</invocationTargetType> | ||
<isConfirmationRequired>false</isConfirmationRequired> | ||
<masterLabel>CustomKnowledgeAction_1738700253695</masterLabel> | ||
</GenAiFunction> |
53 changes: 53 additions & 0 deletions
53
...ctions/originalMdapi/genAiFunctions/CustomKnowledgeAction_1738700253695/input/schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"required": ["query"], | ||
"unevaluatedProperties": false, | ||
"properties": { | ||
"query": { | ||
"title": "Query", | ||
"description": "Required. A string created by generative AI to be used in the knowledge article search.", | ||
"const": "", | ||
"lightning:type": "lightning__textType", | ||
"lightning:isPII": false, | ||
"copilotAction:isUserInput": true | ||
}, | ||
"citationsUrl": { | ||
"title": "Citations Url", | ||
"description": "The URL to use for citations for custom Agents.", | ||
"const": "", | ||
"lightning:type": "lightning__textType", | ||
"lightning:isPII": false, | ||
"copilotAction:isUserInput": true | ||
}, | ||
"ragFeatureConfigId": { | ||
"title": "RAG Feature Configuration Id", | ||
"description": "The RAG Feature ID to use for grounding this copilot action invocation.", | ||
"const": "", | ||
"lightning:type": "lightning__textType", | ||
"lightning:isPII": false, | ||
"copilotAction:isUserInput": true | ||
}, | ||
"citationsEnabled": { | ||
"title": "Citations Enabled", | ||
"description": "Whether or not citations are enabled.", | ||
"const": false, | ||
"lightning:type": "lightning__booleanType", | ||
"lightning:isPII": false, | ||
"copilotAction:isUserInput": true | ||
}, | ||
"mode": { | ||
"title": "The mode to run in.", | ||
"description": "The mode to use (Professor/Smart/Basic). Determines which prompt template to use.", | ||
"lightning:type": "lightning__textType", | ||
"lightning:isPII": false, | ||
"copilotAction:isUserInput": false | ||
}, | ||
"retrieverMode": { | ||
"title": "The retriever mode to use.", | ||
"description": "The retriever mode to use (Simple/Augmented). Determines whether to do query regeneration", | ||
"lightning:type": "lightning__textType", | ||
"lightning:isPII": false, | ||
"copilotAction:isUserInput": false | ||
} | ||
}, | ||
"lightning:type": "lightning__objectType" | ||
} |
14 changes: 14 additions & 0 deletions
14
...tions/originalMdapi/genAiFunctions/CustomKnowledgeAction_1738700253695/output/schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"unevaluatedProperties": false, | ||
"properties": { | ||
"knowledgeSummary": { | ||
"title": "Knowledge Summary", | ||
"description": "A string formatted as rich text that includes a summary of the information retrieved from the knowledge articles and citations to those articles.", | ||
"lightning:type": "lightning__richTextType", | ||
"lightning:isPII": false, | ||
"copilotAction:isDisplayable": true, | ||
"copilotAction:isUsedByPlanner": true | ||
} | ||
}, | ||
"lightning:type": "lightning__objectType" | ||
} |
9 changes: 9 additions & 0 deletions
9
test/snapshot/sampleProjects/genAiFunctions/sfdx-project.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"packageDirectories": [ | ||
{ | ||
"default": true, | ||
"path": "force-app" | ||
} | ||
], | ||
"sourceApiVersion": "59.0" | ||
} |
52 changes: 52 additions & 0 deletions
52
test/snapshot/sampleProjects/genAiFunctions/snapshot.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Copyright (c) 2023, salesforce.com, inc. | ||
* All rights reserved. | ||
* Licensed under the BSD 3-Clause license. | ||
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause | ||
*/ | ||
import * as fs from 'node:fs'; | ||
import * as path from 'node:path'; | ||
import { | ||
FORCE_APP, | ||
dirsAreIdentical, | ||
fileSnap, | ||
mdapiToSource, | ||
sourceToMdapi, | ||
MDAPI_OUT, | ||
} from '../../helper/conversions'; | ||
|
||
// we don't want failing tests outputting over each other | ||
/* eslint-disable no-await-in-loop */ | ||
|
||
describe('genAiFunctions', () => { | ||
const testDir = path.join('test', 'snapshot', 'sampleProjects', 'genAiFunctions'); | ||
let sourceFiles: string[]; | ||
let mdFiles: string[]; | ||
|
||
before(async () => { | ||
await fs.promises.mkdir(path.join(testDir, FORCE_APP), { recursive: true }); | ||
sourceFiles = await mdapiToSource(testDir); | ||
mdFiles = await sourceToMdapi(testDir); | ||
}); | ||
it('verify source files', async () => { | ||
for (const file of sourceFiles) { | ||
await fileSnap(file, testDir); | ||
} | ||
await dirsAreIdentical( | ||
path.join(testDir, FORCE_APP), | ||
path.join(testDir, '__snapshots__', 'verify-source-files.expected', FORCE_APP) | ||
); | ||
}); | ||
it('verify md files', async () => { | ||
for (const file of mdFiles) { | ||
await fileSnap(file, testDir); | ||
} | ||
}); | ||
|
||
after(async () => { | ||
await Promise.all([ | ||
fs.promises.rm(path.join(testDir, FORCE_APP), { recursive: true, force: true }), | ||
fs.promises.rm(path.join(testDir, MDAPI_OUT), { recursive: true, force: true }), | ||
]); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bd67cf8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark
eda-componentSetCreate-linux
232
ms222
ms1.05
eda-sourceToMdapi-linux
2058
ms2051
ms1.00
eda-sourceToZip-linux
1883
ms1866
ms1.01
eda-mdapiToSource-linux
2639
ms3585
ms0.74
lotsOfClasses-componentSetCreate-linux
487
ms480
ms1.01
lotsOfClasses-sourceToMdapi-linux
3635
ms3709
ms0.98
lotsOfClasses-sourceToZip-linux
2984
ms2916
ms1.02
lotsOfClasses-mdapiToSource-linux
3535
ms3487
ms1.01
lotsOfClassesOneDir-componentSetCreate-linux
835
ms819
ms1.02
lotsOfClassesOneDir-sourceToMdapi-linux
6332
ms6410
ms0.99
lotsOfClassesOneDir-sourceToZip-linux
5161
ms5173
ms1.00
lotsOfClassesOneDir-mdapiToSource-linux
6403
ms6281
ms1.02
This comment was automatically generated by workflow using github-action-benchmark.
bd67cf8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark
eda-componentSetCreate-win32
733
ms700
ms1.05
eda-sourceToMdapi-win32
4230
ms4167
ms1.02
eda-sourceToZip-win32
3310
ms3361
ms0.98
eda-mdapiToSource-win32
6120
ms5833
ms1.05
lotsOfClasses-componentSetCreate-win32
1421
ms1439
ms0.99
lotsOfClasses-sourceToMdapi-win32
8499
ms8248
ms1.03
lotsOfClasses-sourceToZip-win32
5618
ms5193
ms1.08
lotsOfClasses-mdapiToSource-win32
8503
ms8207
ms1.04
lotsOfClassesOneDir-componentSetCreate-win32
2634
ms2484
ms1.06
lotsOfClassesOneDir-sourceToMdapi-win32
15280
ms14638
ms1.04
lotsOfClassesOneDir-sourceToZip-win32
9709
ms9351
ms1.04
lotsOfClassesOneDir-mdapiToSource-win32
15004
ms14997
ms1.00
This comment was automatically generated by workflow using github-action-benchmark.