semantic-kernel icon indicating copy to clipboard operation
semantic-kernel copied to clipboard

Allow custom semantic backend?

Open LittleLittleCloud opened this issue 1 year ago • 3 comments

Hi folks, currently semantic kernel only allows us to use either OpenAI or Azure OpenAI as TextCompletion or Embedding backends. Is it possible for your team to add support for a customized TextCompletion backend? It will be helpful for developers who host their own GPT or AICG service.

use case

// my customized semantic backend
ITextCompletionClient myGossipTextClientInstance

IBackendConfig myGossipTextClientConfig

// suggested API to add config to kernel
kernel.Config.AddTextCompletionBackend(myGossipTextClientConfig, myGossipTextClientInstance)

LittleLittleCloud avatar Mar 19 '23 23:03 LittleLittleCloud

Hi @LittleLittleCloud , thanks for sending feedback. We are actively working on better multi-model and multi-modal support and will have an update on this shortly.

timlaverty avatar Mar 20 '23 00:03 timlaverty

@timlaverty Thanks, looking forward to having this functionality in semantic kernel.

LittleLittleCloud avatar Mar 20 '23 05:03 LittleLittleCloud

@LittleLittleCloud as @timlaverty we're actively working on this.

In the meantime, just in case you are blocked, by the design the kernel allows to plug in any function that implements the ISKFunction interface. So, only if this is urgent, this is one available path to integrate any model not yet supported.

dluc avatar Mar 20 '23 07:03 dluc

@dluc This is now supported as of this PR https://github.com/microsoft/semantic-kernel/pull/161 right?

craigomatic avatar Mar 30 '23 04:03 craigomatic

This is now in the main branch, @LittleLittleCloud thanks for the feedback!

evchaki avatar Apr 04 '23 15:04 evchaki