Skip to content

Add langchain samples - #8

Merged
Radhika Gupta (rads-1996) merged 6 commits into
microsoft:mainfrom
rads-1996:add-langchain-samples
Apr 1, 2026
Merged

Radhika Gupta (rads-1996) merged 6 commits into
microsoft:mainfrom
rads-1996:add-langchain-samples

Conversation

@rads-1996

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings April 1, 2026 20:20

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.

Pull request overview

Adds three LangChain-focused Python sample scripts demonstrating OpenTelemetry tracing/instrumentation scenarios relevant to this distro’s planned GenAI observability story.

Changes:

  • Added an OpenTelemetry + LangChain instrumentation sample with multi-turn and config comparison scenarios.
  • Added a “nested agents” travel-planner sample wired to an Azure AI OpenTelemetry tracer.
  • Added an image (multimodal) LangChain sample using OpenInference + Azure Monitor configuration.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 11 comments.

File Description
samples/langchain/sample_opentelemetry.py Demonstrates LangChain OTel instrumentation with multi-turn and temperature comparison scenarios.
samples/langchain/sample_langchain_azure.py Demonstrates nested LangChain agent orchestration with Azure AI OpenTelemetry tracing callbacks.
samples/langchain/sample_arise_langchain.py Demonstrates image prompting with LangChain + OpenInference instrumentation and Azure Monitor export.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread samples/langchain/sample_opentelemetry.py Outdated
Comment thread samples/langchain/sample_opentelemetry.py
Comment thread samples/langchain/sample_opentelemetry.py
Comment thread samples/langchain/sample_langchain_azure.py Outdated
Comment thread samples/langchain/sample_langchain_azure.py
Comment thread samples/langchain/sample_arise_langchain.py
Comment thread samples/langchain/sample_arise_langchain.py
Comment thread samples/langchain/sample_opentelemetry.py
Comment thread samples/langchain/sample_opentelemetry.py Outdated
Comment thread samples/langchain/sample_langchain_azure.py

# Otherwise, set the env variable OPENAI_API_KEY

image_url = "<IMAGE_URL>"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do you need to some URL here?, do we need a readme for samples so people understand how to run them?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, the user can enter any URL they want the LLM to describe for them. Yes, I will add a readme.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@rads-1996
Radhika Gupta (rads-1996) merged commit 0d533a4 into microsoft:main Apr 1, 2026
6 checks passed
@rads-1996
Radhika Gupta (rads-1996) deleted the add-langchain-samples branch April 1, 2026 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants