Skip to content

Python: Add embedding and text completion samples#10797

Merged
TaoChenOSU merged 7 commits intomicrosoft:mainfrom
TaoChenOSU:taochen/python-add-embedding-and-text-completion-samples
Mar 5, 2025
Merged

Python: Add embedding and text completion samples#10797
TaoChenOSU merged 7 commits intomicrosoft:mainfrom
TaoChenOSU:taochen/python-add-embedding-and-text-completion-samples

Conversation

@TaoChenOSU
Copy link
Copy Markdown
Contributor

@TaoChenOSU TaoChenOSU commented Mar 4, 2025

Motivation and Context

Closing #9963

Description

  1. Add text embedding and text completion samples.
  2. Move the embedding generator base to a semantic_kernel.connectors.ai.

Contribution Checklist

@TaoChenOSU TaoChenOSU added the python Pull requests for the Python Semantic Kernel label Mar 4, 2025
@TaoChenOSU TaoChenOSU self-assigned this Mar 4, 2025
@TaoChenOSU TaoChenOSU requested a review from a team as a code owner March 4, 2025 23:19
@github-actions github-actions bot changed the title Add embedding and text completion samples Python: Add embedding and text completion samples Mar 4, 2025
@TaoChenOSU TaoChenOSU linked an issue Mar 4, 2025 that may be closed by this pull request
@markwallace-microsoft
Copy link
Copy Markdown
Contributor

markwallace-microsoft commented Mar 4, 2025

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
semantic_kernel
   kernel.py2024777%143, 154, 158, 308–311, 428, 442–485
semantic_kernel/connectors/ai
   embedding_generator_base.py8188%50
semantic_kernel/connectors/ai/bedrock/services
   bedrock_text_embedding.py44198%93
semantic_kernel/connectors/ai/embeddings
   embedding_generator_base.py770%3–16
semantic_kernel/connectors/ai/google/google_ai/services
   google_ai_text_embedding.py40198%97
semantic_kernel/connectors/ai/hugging_face/services
   hf_text_embedding.py32584%80–84
semantic_kernel/connectors/ai/mistral_ai/services
   mistral_ai_text_embedding.py39197%108
TOTAL19601256187% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
3207 5 💤 0 ❌ 0 🔥 1m 38s ⏱️

@TaoChenOSU TaoChenOSU enabled auto-merge March 5, 2025 00:34
Comment thread python/samples/concepts/setup/text_embedding_services.py Outdated
Comment thread python/semantic_kernel/connectors/ai/embeddings/embedding_generator_base.py Outdated
Comment thread python/samples/concepts/embedding/text_embedding_generation.py
@TaoChenOSU TaoChenOSU added this pull request to the merge queue Mar 5, 2025
@TaoChenOSU TaoChenOSU removed this pull request from the merge queue due to a manual request Mar 5, 2025
@TaoChenOSU TaoChenOSU enabled auto-merge March 5, 2025 17:28
Comment thread python/samples/concepts/embedding/text_embedding_generation.py Outdated
@TaoChenOSU TaoChenOSU added this pull request to the merge queue Mar 5, 2025
Merged via the queue into microsoft:main with commit e1184ae Mar 5, 2025
28 checks passed
@TaoChenOSU TaoChenOSU deleted the taochen/python-add-embedding-and-text-completion-samples branch March 5, 2025 19:45
@github-project-automation github-project-automation bot moved this to Sprint: Done in Semantic Kernel Mar 5, 2025
musale pushed a commit to musale/semantic-kernel that referenced this pull request Mar 10, 2025
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Closing microsoft#9963

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
1. Add text embedding and text completion samples.
2. Move the embedding generator base to a
`semantic_kernel.connectors.ai`.

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
jcruzmot-te pushed a commit to thousandeyes/aia-semantic-kernel that referenced this pull request Sep 15, 2025
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Closing microsoft#9963

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
1. Add text embedding and text completion samples.
2. Move the embedding generator base to a
`semantic_kernel.connectors.ai`.

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Pull requests for the Python Semantic Kernel

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Python: Samples for text completion and embedding generation

5 participants