Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add support for dimensions parameter to OpenAIEmbedding #2215

Merged
merged 5 commits into from
May 1, 2024

Conversation

gramhagen
Copy link
Contributor

Related Issues/PRs

Closes #2177

What changes are proposed in this pull request?

Adding support for dimensions parameter when calling OpenAI Embeddings endpoint to reduce the size of the embedding vecor.

How is this patch tested?

Added Extra Param Usage test to OpenAIEmbeddingSuite

  • I have written tests (not required for typo or doc fix) and confirmed the proposed feature/bug-fix/change works.

Does this PR change any dependencies?

  • No. You can skip this section.
  • Yes. Make sure the dependencies are resolved correctly, and list changes here.

Does this PR add a new feature? If so, have you added samples on website?

  • No. You can skip this section.
  • Yes. Make sure you have added samples following below steps.

Added example to existing OpenAI.md

  1. Find the corresponding markdown file for your new feature in website/docs/documentation folder.
    Make sure you choose the correct class estimators/transformers and namespace.
  2. Follow the pattern in markdown file and add another section for your new API, including pyspark, scala (and .NET potentially) samples.
  3. Make sure the DocTable points to correct API link.
  4. Navigate to website folder, and run yarn run start to make sure the website renders correctly.
  5. Don't forget to add <!--pytest-codeblocks:cont--> before each python code blocks to enable auto-tests for python samples.
  6. Make sure the WebsiteSamplesTests job pass in the pipeline.

@acrolinxatmsft1
Copy link

Acrolinx Scorecards

A minimum total score of 80 is required.

Select the total score link to review all feedback on clarity, consistency, tone, brand, terms, spelling, grammar, readability, and inclusive language. You should fix all spelling errors regardless of your total score. Fixing spelling errors helps maintain customer trust in overall content quality.

Article Total score
(Required: 80)
Words + phrases
(Brand, terms)
Correctness
(Spelling, grammar)
Clarity
(Readability)
website/versioned_docs/version-1.0.4/Explore Algorithms/OpenAI/OpenAI.md 77 93 93 51

More information about Acrolinx

@gramhagen gramhagen changed the title adding support for dimensions parameter to OpenAIEmbedding chore: add support for dimensions parameter to OpenAIEmbedding Apr 26, 2024
mhamilton723
mhamilton723 previously approved these changes Apr 29, 2024
@mhamilton723
Copy link
Collaborator

/azp run

@acrolinxatmsft1
Copy link

Acrolinx Scorecards

A minimum total score of 80 is required.

Select the total score link to review all feedback on clarity, consistency, tone, brand, terms, spelling, grammar, readability, and inclusive language. You should fix all spelling errors regardless of your total score. Fixing spelling errors helps maintain customer trust in overall content quality.

Article Total score
(Required: 80)
Words + phrases
(Brand, terms)
Correctness
(Spelling, grammar)
Clarity
(Readability)
website/versioned_docs/version-1.0.4/Explore Algorithms/OpenAI/OpenAI.md 77 93 93 51

More information about Acrolinx

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@codecov-commenter
Copy link

codecov-commenter commented Apr 29, 2024

Codecov Report

Attention: Patch coverage is 90.90909% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 86.17%. Comparing base (e10a91e) to head (d59f417).

Files Patch % Lines
...soft/azure/synapse/ml/services/openai/OpenAI.scala 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2215      +/-   ##
==========================================
- Coverage   86.19%   86.17%   -0.03%     
==========================================
  Files         327      327              
  Lines       16705    16715      +10     
  Branches     1501     1495       -6     
==========================================
+ Hits        14399    14404       +5     
- Misses       2306     2311       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@acrolinxatmsft1
Copy link

Acrolinx Scorecards

A minimum total score of 80 is required.

Select the total score link to review all feedback on clarity, consistency, tone, brand, terms, spelling, grammar, readability, and inclusive language. You should fix all spelling errors regardless of your total score. Fixing spelling errors helps maintain customer trust in overall content quality.

Article Total score
(Required: 80)
Words + phrases
(Brand, terms)
Correctness
(Spelling, grammar)
Clarity
(Readability)
website/versioned_docs/version-1.0.4/Explore Algorithms/OpenAI/OpenAI.md 77 93 93 51

More information about Acrolinx

@mhamilton723
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@acrolinxatmsft1
Copy link

Acrolinx Scorecards

A minimum total score of 80 is required.

Select the total score link to review all feedback on clarity, consistency, tone, brand, terms, spelling, grammar, readability, and inclusive language. You should fix all spelling errors regardless of your total score. Fixing spelling errors helps maintain customer trust in overall content quality.

Article Total score
(Required: 80)
Words + phrases
(Brand, terms)
Correctness
(Spelling, grammar)
Clarity
(Readability)
website/versioned_docs/version-1.0.4/Explore Algorithms/OpenAI/OpenAI.md 77 93 93 51

More information about Acrolinx

@mhamilton723 mhamilton723 merged commit d0a2161 into microsoft:master May 1, 2024
6 checks passed
@gramhagen gramhagen deleted the gramhagen/openai-emb-dims branch May 13, 2024 14:37
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.

How to use text-embedding-3-small with different output dimensions?
4 participants