Skip to content

feat(embedding-model-v2): add response body field#5700

Merged
samdenty merged 8 commits intov5from
feat/embedding-v2-body
Apr 14, 2025
Merged

feat(embedding-model-v2): add response body field#5700
samdenty merged 8 commits intov5from
feat/embedding-v2-body

Conversation

@samdenty
Copy link
Copy Markdown
Contributor

@samdenty samdenty commented Apr 11, 2025

Background

Summary

This adds a response body field to embedding model v2

Tasks

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • If required, a patch changeset for relevant packages has been added
  • You've run pnpm prettier-fix to fix any formatting issues

Future Work

@lgrammel
Copy link
Copy Markdown
Collaborator

Is body exposed by embed and embedMany?

Base automatically changed from feat/embedding-v2 to v5 April 12, 2025 06:42
@samdenty
Copy link
Copy Markdown
Contributor Author

@lgrammel just added tests :)

/**
Optional raw response data.
*/
readonly rawResponses?: Array<
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice - should be eventually renamed to responses once the rename PR lands.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

is this similar to what we do for transcribe?

Copy link
Copy Markdown
Contributor Author

@samdenty samdenty Apr 12, 2025

Choose a reason for hiding this comment

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

@lgrammel
Copy link
Copy Markdown
Collaborator

Will revisit after #5699 lands bc of the dependency

@samdenty
Copy link
Copy Markdown
Contributor Author

@lgrammel updated the PR to use the new responses field instead of rawResponses

@lgrammel
Copy link
Copy Markdown
Collaborator

Can you split into 2 PRs, one for adding responses to embedMany and one for the rename? The embedMany API change needs docs updates as well (reference docs).

@samdenty samdenty force-pushed the feat/embedding-v2-body branch from bae298f to 7ebd602 Compare April 14, 2025 14:53
@samdenty samdenty merged commit 443d8ec into v5 Apr 14, 2025
7 checks passed
@samdenty samdenty deleted the feat/embedding-v2-body branch April 14, 2025 15:30
samdenty pushed a commit that referenced this pull request Apr 15, 2025
* origin/v5: (36 commits)
  fix (provider): remove deprecated `Experimental_LanguageModelV2Middleware` (#5775)
  fix (ai): remove deprecated `options.throwErrorForEmptyVectors` from `cosineSimilarity()` (#5772)
  fix (ai/core): filter out empty content/text assistant messages (#5767) (#5783)
  fix (ai): remove deprecated `CoreTool*` types (#5768)
  chore: refactor text parts (spec) (#5759)
  feat(embedding-model-v2): add response body field (#5700)
  feat(embedding-model-v2): add providerOptions (#5698)
  chore: refactor reasoning parts (spec) (#5756)
  chore: update .gitignore (#5755)
  chore: refactor source parts (spec) (#5753)
  chore: refactor file parts (spec) (#5750)
  chore: refactor tool call and tool call delta parts (spec) (#5746)
  fix(providers/xai): edit supported models for structured output (#5715) (#5741)
  chore (ai): remove provider re-exports (#5734)
  chore (provider): extract shared provider options and metadata (spec) (#5733)
  fix(ai/core): properly handle custom separator in provider registry (#5713) (#5732)
  chore (providers/xai): update grok-3 model aliases (#5646)
  chore(embedding-model-v2): rename rawResponse to response (#5699)
  chore(providers/mistral): convert to providerOptions (#5675)
  chore: refactor file towards source pattern (spec) (#5709)
  ...
samdenty pushed a commit that referenced this pull request Apr 15, 2025
…der-options

* origin/v5: (36 commits)
  fix (provider): remove deprecated `Experimental_LanguageModelV2Middleware` (#5775)
  fix (ai): remove deprecated `options.throwErrorForEmptyVectors` from `cosineSimilarity()` (#5772)
  fix (ai/core): filter out empty content/text assistant messages (#5767) (#5783)
  fix (ai): remove deprecated `CoreTool*` types (#5768)
  chore: refactor text parts (spec) (#5759)
  feat(embedding-model-v2): add response body field (#5700)
  feat(embedding-model-v2): add providerOptions (#5698)
  chore: refactor reasoning parts (spec) (#5756)
  chore: update .gitignore (#5755)
  chore: refactor source parts (spec) (#5753)
  chore: refactor file parts (spec) (#5750)
  chore: refactor tool call and tool call delta parts (spec) (#5746)
  fix(providers/xai): edit supported models for structured output (#5715) (#5741)
  chore (ai): remove provider re-exports (#5734)
  chore (provider): extract shared provider options and metadata (spec) (#5733)
  fix(ai/core): properly handle custom separator in provider registry (#5713) (#5732)
  chore (providers/xai): update grok-3 model aliases (#5646)
  chore(embedding-model-v2): rename rawResponse to response (#5699)
  chore(providers/mistral): convert to providerOptions (#5675)
  chore: refactor file towards source pattern (spec) (#5709)
  ...
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.

2 participants