Skip to content

Python: Integrate chat stream into kernel #1606

@joowon-dm-snu

Description

@joowon-dm-snu

I checked 2 PRs(#1115, #1316) for streaming. Both PRs are defining kernel = sk.Kernel() but not using them at all.
Current chat streaming is complex to use with Kernel.

hope streaming can be used via kernel like below

kernel = sk.Kernel()
kernel.add_chat_service(
        "gpt-3.5-turbo",
        sk_oai.AzureChatCompletion(
            "gpt-35-turbo",
            os.environ.get("AZURE_OPENAI_ENDPOINT"),
            os.environ.get("AZURE_OPENAI_KEY"),
        ),
    )
skills = kernel.import_semantic_skill_from_directory(skill_dir, skill)
kernel.run_stream_async(skill["TranslationSkill"]["toEnglish"], input_vars=...)

Metadata

Metadata

Labels

pythonPull requests for the Python Semantic Kernel

Type

No type

Projects

Status

Sprint: Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions