How to add My own ComputeProvider, #103
Unanswered
zhanghongyong123456
asked this question in
Q&A - Help - Support
Replies: 1 comment
-
Hi, I'm not sure about this specific syntax and way of extending an enum, but if you would like to add a new public ComputeProvider that could benefit everyon (eg. a public cloud API service provider, or an open-source platform that we can run locally) let me know and I will add it if this is regarding ComfyUI, I have added a new provider for this ( |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
when i use
extend-compute-provider.tx
import { ComputeProvider } from '@aitube/clapper-services'
declare module '@aitube/clapper-services' {
export enum ComputeProvider {
MyComputeProvider = 'xiaosi',
}
}
console.log('打印扩展是否生效', ComputeProvider.MyComputeProvider)
in main.tsx test:
import '@/store/extend-compute-provider'
import('@aitube/clapper-services')
.then((module) => {
console.log(module); // 输出整个模块对象
console.log(module.ComputeProvider); // output ComputeProvider
console.log(module.ComputeProvider?.MyComputeProvider, '模块导入成功'); /
})
.catch((error) => {
console.error('模块导入失败:', error);
});
output is undefined
What should I do
Beta Was this translation helpful? Give feedback.
All reactions