MicrosoftDocs / semantic-kernel-docs

Semantic Kernel (SK) is a lightweight SDK enabling integration of AI Large Language Models (LLMs) with conventional programming languages.
MIT License
173 stars 100 forks source link

adding completion service to Kernel is working for Azure OpenAI but not for OpenAI #43

Closed cedricve closed 9 months ago

cedricve commented 9 months ago

It looks like something went wrong while building the config/add_completion_service.py file. The completion service gets added to the Kernel when defining the LLM_SERVICE as AzureOpenAI, but not when using OpenAI.

  1. The wrong environment variable was used, it was still referencing the AzureOpenAI ID, while choosing the OpenAI LLM service.
  2. The way how the chat service or completion service was creation didn't work as it was creating a new kernel instead of extending the existing kernel.

Hopes this helps ;) For me at least it now works with both LLM services. Thanks for the great tutorials! Cedric

learn-build-service-prod[bot] commented 9 months ago

Learn Build status updates of commit 232f4b9:

:white_check_mark: Validation status: passed

File Status Preview URL Details
samples/python/03-Inline-Semantic-Functions/config/add_completion_service.py :white_check_mark:Succeeded
samples/python/04-Serializing-Semantic-Functions/config/add_completion_service.py :white_check_mark:Succeeded
samples/python/05-Templatizing-Semantic-Functions/config/add_completion_service.py :white_check_mark:Succeeded
samples/python/06-Calling-Nested-Functions-in-Semantic-Functions/config/add_completion_service.py :white_check_mark:Succeeded
samples/python/07-Simple-Native-Functions/config/add_completion_service.py :white_check_mark:Succeeded
samples/python/08-Native-Functions-with-Context/config/add_completion_service.py :white_check_mark:Succeeded
samples/python/09-Calling-Nested-Functions-in-Native-Functions/config/add_completion_service.py :white_check_mark:Succeeded
samples/python/10-Chaining-Functions/config/add_completion_service.py :white_check_mark:Succeeded
samples/python/11-Planner/config/add_completion_service.py :white_check_mark:Succeeded

For more details, please refer to the build report.

For any questions, please:

matthewbolanos commented 9 months ago

Closing this PR since another PR also fixed this issue; thanks for raising!