Skip to content

Commit 2b31629

Browse files
authored
Update InteractWithGraph.tsx - Fix failures caused by break change of stripping off the async suffix from SK functions (#2483)
Fix failures caused by break change of stripping off the async suffix from SK functions ### Motivation and Context The auth-api sample doesn't work anymore because of the break change listed in https://github.com/freistli/semantic-kernel/blob/main/docs/decisions/0003-support-multiple-native-function-args.md Updated name selection heuristic to strip off an "Async" suffix for async methods. ### Description KernelServer service reports similar errors the sample is calling: Result: Function 'InvokeFunction', Invocation id '6dcbc5af-9484-4357-a5ac-c91b585dfac5': An exception was thrown by the invocation. Exception: System.AggregateException: One or more errors occurred. (Function not available: Function not available emailskill.getmyemailaddressasync) ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄
1 parent f0ab0fb commit 2b31629

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

samples/apps/auth-api-webapp-react/src/components/InteractWithGraph.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const InteractWithGraph: FC<IData> = ({ uri, config, onBack }) => {
3535
inputs: [{ key: 'filePath', value: path }],
3636
},
3737
'documentskill',
38-
'appendtextasync',
38+
'appendtext',
3939
);
4040

4141
//upload to onedrive
@@ -46,7 +46,7 @@ const InteractWithGraph: FC<IData> = ({ uri, config, onBack }) => {
4646
inputs: [{ key: 'destinationPath', value: destinationPath }],
4747
},
4848
'clouddriveskill',
49-
'uploadfileasync',
49+
'uploadfile',
5050
);
5151
} catch (e) {
5252
alert('Something went wrong.\n\nDetails:\n' + e);
@@ -59,9 +59,9 @@ const InteractWithGraph: FC<IData> = ({ uri, config, onBack }) => {
5959
config,
6060
{ value: destinationPath },
6161
'clouddriveskill',
62-
'createlinkasync',
62+
'createlink',
6363
);
64-
var myEmail = await sk.invokeAsync(config, { value: '' }, 'emailskill', 'getmyemailaddressasync');
64+
var myEmail = await sk.invokeAsync(config, { value: '' }, 'emailskill', 'getmyemailaddress');
6565

6666
await sk.invokeAsync(
6767
config,
@@ -79,7 +79,7 @@ const InteractWithGraph: FC<IData> = ({ uri, config, onBack }) => {
7979
],
8080
},
8181
'emailskill',
82-
'sendemailasync',
82+
'sendemail',
8383
);
8484
} catch (e) {
8585
alert('Something went wrong.\n\nDetails:\n' + e);
@@ -103,7 +103,7 @@ const InteractWithGraph: FC<IData> = ({ uri, config, onBack }) => {
103103
],
104104
},
105105
'tasklistskill',
106-
'addtaskasync',
106+
'addtask',
107107
);
108108
} catch (e) {
109109
alert('Something went wrong.\n\nDetails:\n' + e);

0 commit comments

Comments
 (0)