update examples

This commit is contained in:
better629 2023-12-22 16:25:06 +08:00
parent 19c16bf9f1
commit 7816488445
7 changed files with 54 additions and 69 deletions

View file

@ -21,12 +21,14 @@ def make_sk_kernel():
if CONFIG.openai_api_type == "azure":
kernel.add_chat_service(
"chat_completion",
AzureChatCompletion(CONFIG.deployment_name, CONFIG.openai_base_url, CONFIG.openai_api_key),
AzureChatCompletion(
deployment_name=CONFIG.deployment_name, base_url=CONFIG.openai_base_url, api_key=CONFIG.openai_api_key
),
)
else:
kernel.add_chat_service(
"chat_completion",
OpenAIChatCompletion(CONFIG.openai_api_model, CONFIG.openai_api_key),
OpenAIChatCompletion(model_id=CONFIG.openai_api_model, api_key=CONFIG.openai_api_key),
)
return kernel