Skip to content

Python: Duplicate Configuration Code Block in 02-running-prompts-from-file.ipynb #12765

@gbm

Description

@gbm

File: python/samples/getting_started/02-running-prompts-from-file.ipynb

Description: The following code block appears twice in the notebook and is only necessary once:

from services import Service

from samples.service_settings import ServiceSettings

service_settings = ServiceSettings()

# Select a service to use for this notebook (available services: OpenAI, AzureOpenAI, HuggingFace)
selectedService = (
    Service.AzureOpenAI
    if service_settings.global_llm_service is None
    else Service(service_settings.global_llm_service.lower())
)
print(f"Using service type: {selectedService}")

Suggestion:
Please remove the duplicate (and also the supporting english sentence preceeding the repeated block) so that this code only appears once to avoid confusion and keep the notebook concise.

Metadata

Metadata

Assignees

No one assigned

    Labels

    pythonPull requests for the Python Semantic Kernelsamples

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions