Skip to content

[#682] Samples Parity: Align JS langchain-multiturn with .NET and python's semantic-kernel-multiturn - #737

Merged
tracyboehrer (tracyboehrer) merged 8 commits into
mainfrom
southworks/update/parity-langchain-semantic-kernel-samples
Sep 22, 2026
Merged

tracyboehrer (tracyboehrer) merged 8 commits into
mainfrom
southworks/update/parity-langchain-semantic-kernel-samples

Conversation

@ceciliaavila

Copy link
Copy Markdown
Collaborator

Addresses #682

Description

This pull request updates Nodejs langchain-multiturn and .NET and Python's semantic-kernel-multiturn samples to align behavior and naming conventions.

Detailed Changes

  • Unified welcome, progress, failure messages, prompts, temperature ranges, Fahrenheit conversion, and history limits.
  • Standardized naming around WeatherAgent, WeatherForecastAgent, and matching plugins/tools.
  • Added deterministic Adaptive Card 1.5 generation with location, date, C/F, and MSN Weather link.
  • Added structured response validation and a maximum of two format attempts.
  • Added robust error handling with guaranteed stream completion.
  • Added Azure OpenAI and OpenAI support across all samples.
  • Updated configuration templates and READMEs.
  • Removed the hardcoded JS sensitivity label.
  • Retained generated-AI and feedback metadata in JS and Python.
  • Added bounded model context/history.

Testing

These images show the samples working after the changes.
image

Copilot AI lite review requested due to automatic review settings September 22, 2026 16:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Unresolved moderate issues remain in history bounds, event handling, and structured-response validation.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 6 Medium severity · 1 Low severity

Open (7)
What changed in this PR

This PR aligns the Python, JavaScript, and .NET multi-turn weather samples with shared behavior, configuration, structured responses, and Adaptive Cards.

Changes:

  • Standardizes agents, tools/plugins, prompts, forecasts, and progress reporting.
  • Adds structured validation, retries, streaming, error handling, and history management.
  • Updates documentation, manifests, dependencies, and environment templates.
File Reviewed changes and final notes
samples/​python/​semantic-kernel-multiturn/​src/​start_server.py Adds licensing and port parsing.
samples/​python/​semantic-kernel-multiturn/​src/​plugins/​weather_forecast.py Adds forecast location data.
samples/​python/​semantic-kernel-multiturn/​src/​plugins/​weather_forecast_plugin.py Adds standardized forecasts and progress reporting.
samples/​python/​semantic-kernel-multiturn/​src/​plugins/​progress.py Provides turn-scoped progress reporting.
samples/​python/​semantic-kernel-multiturn/​src/​plugins/​date_time_plugin.py Standardizes date/time tools.
samples/​python/​semantic-kernel-multiturn/​src/​plugins/​adaptive_card_plugin.py Generates Adaptive Card 1.5 responses.
samples/​python/​semantic-kernel-multiturn/​src/​plugins/​__init__.py Adds licensing metadata.
samples/​python/​semantic-kernel-multiturn/​src/​app.py Adds provider selection, streaming, metadata, and error handling.
samples/​python/​semantic-kernel-multiturn/​src/​agent.py Adds structured validation, retries, and history trimming. Moderate (3 votes): trim history before raising after failed attempts. Moderate (2 votes): validate required weather facts and MSN Weather action in cards.
samples/​python/​semantic-kernel-multiturn/​requirements.txt Adds dotenv support.
samples/​python/​semantic-kernel-multiturn/​README.md Refreshes setup and usage documentation.
samples/​python/​semantic-kernel-multiturn/​env.TEMPLATE Adds Azure/OpenAI configuration options.
samples/​nodejs/​langchain-multiturn/​src/​weatherAgent.ts Implements the LangChain weather agent and streaming flow. Moderate (3 votes): bound conversation history. Moderate (3 votes): filter the bot from membersAdded events.
samples/​nodejs/​langchain-multiturn/​src/​tools/​weatherForecastTool.ts Adds the standardized weather tool.
samples/​nodejs/​langchain-multiturn/​src/​tools/​progressContext.ts Adds turn-scoped progress reporting.
samples/​nodejs/​langchain-multiturn/​src/​tools/​getWeatherTool.ts Removes the obsolete weather tool.
samples/​nodejs/​langchain-multiturn/​src/​tools/​dateTimeTool.ts Standardizes date/time tools.
samples/​nodejs/​langchain-multiturn/​src/​tools/​adaptiveCardTool.ts Generates Adaptive Card 1.5 responses.
samples/​nodejs/​langchain-multiturn/​src/​myAgent.ts Removes the replaced agent implementation.
samples/​nodejs/​langchain-multiturn/​src/​index.ts Updates the agent entry point.
samples/​nodejs/​langchain-multiturn/​README.md Refreshes setup documentation. Nit (3 votes): documented Node.js 20 conflicts with dependency requirements of Node.js 22 or newer.
samples/​nodejs/​langchain-multiturn/​package.json Updates package metadata and dependencies.
samples/​nodejs/​langchain-multiturn/​package-lock.json Locks updated dependencies.
samples/​nodejs/​langchain-multiturn/​env.TEMPLATE Standardizes environment variables.
samples/​dotnet/​semantic-kernel-multiturn/​WeatherAgent.cs Adds the standardized .NET agent flow.
samples/​dotnet/​semantic-kernel-multiturn/​README.md Refreshes setup and usage documentation.
samples/​dotnet/​semantic-kernel-multiturn/​Program.cs Adds configuration validation and agent registration.
samples/​dotnet/​semantic-kernel-multiturn/​Plugins/​WeatherForecastPlugin.cs Standardizes forecast generation and progress reporting.
samples/​dotnet/​semantic-kernel-multiturn/​Plugins/​WeatherForecast.cs Adds location and updates Fahrenheit conversion.
samples/​dotnet/​semantic-kernel-multiturn/​Plugins/​DateTimePlugin.cs Standardizes date/time tools.
samples/​dotnet/​semantic-kernel-multiturn/​Plugins/​AdaptiveCardPlugin.cs Generates deterministic Adaptive Cards.
samples/​dotnet/​semantic-kernel-multiturn/​MyAgent.cs Removes the replaced agent implementation.
samples/​dotnet/​semantic-kernel-multiturn/​appManifest/​manifest.json Updates application naming and descriptions.
samples/​dotnet/​semantic-kernel-multiturn/​Agents/​WeatherForecastAgentResponse.cs Supports structured text or card content.
samples/​dotnet/​semantic-kernel-multiturn/​Agents/​WeatherForecastAgent.cs Adds retries, validation, plugins, and history handling. Moderate (3 votes): trim history before throwing. Moderate (1 vote): reject undefined content types. Moderate (2 votes): validate required card structure and actions.
Files not reviewed (1)
  • samples/nodejs/langchain-multiturn/package-lock.json: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread samples/dotnet/semantic-kernel-multiturn/Agents/WeatherForecastAgent.cs Outdated
Comment thread samples/nodejs/langchain-multiturn/src/weatherAgent.ts
Comment thread samples/nodejs/langchain-multiturn/src/weatherAgent.ts
Comment thread samples/python/semantic-kernel-multiturn/src/agent.py
Comment thread samples/python/semantic-kernel-multiturn/src/agent.py
Comment thread samples/nodejs/langchain-multiturn/README.md Outdated
@tracyboehrer
tracyboehrer (tracyboehrer) merged commit b7527c8 into main Sep 22, 2026
6 checks passed
@tracyboehrer
tracyboehrer (tracyboehrer) deleted the southworks/update/parity-langchain-semantic-kernel-samples branch September 22, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Samples Changes to Samples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants