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

Allow text-only systemInstruction #8208

Merged
merged 2 commits into from Apr 29, 2024
Merged

Conversation

hsubox76
Copy link
Contributor

@hsubox76 hsubox76 commented Apr 26, 2024

Change so that systemInstruction param can be passed in to the model or to methods as a string, as well as a Part or Content.

Parallel GoogleAI PR: google-gemini/generative-ai-js#113

Copy link

changeset-bot bot commented Apr 26, 2024

⚠️ No Changeset found

Latest commit: 01b2231

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Apr 26, 2024

Size Report 1

Affected Products

  • @firebase/vertexai

    TypeBase (1aadc47)Merge (392380a)Diff
    browser23.9 kB24.4 kB+506 B (+2.1%)
    main24.5 kB25.0 kB+506 B (+2.1%)
    module23.9 kB24.4 kB+506 B (+2.1%)
  • firebase

    TypeBase (1aadc47)Merge (392380a)Diff
    firebase-vertexai.js18.5 kB18.8 kB+316 B (+1.7%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/HHUfvf7xt2.html

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Apr 26, 2024

Size Analysis Report 1

Affected Products

  • @firebase/vertexai

    • GenerativeModel

      Size

      TypeBase (1aadc47)Merge (392380a)Diff
      size15.8 kB16.2 kB+318 B (+2.0%)
      size-with-ext-deps34.3 kB34.6 kB+318 B (+0.9%)

      Dependency

      TypeBase (1aadc47)Merge (392380a)Diff
      functions

      23 dependencies

      addHelpers
      aggregateResponses
      assignRoleToPartsAndValidateSendMessageRequest
      buildFetchOptions
      constructRequest
      countTokens
      formatBlockErrorMessage
      formatGenerateContentInput
      formatNewContent
      generateContent
      generateContentStream
      generateResponseSequence
      getClientHeaders
      getFunctionCalls
      getHeaders
      getResponsePromise
      getResponseStream
      getText
      hadBadFinishReason
      makeRequest
      processStream
      registerVertex
      validateChatHistory

      24 dependencies

      addHelpers
      aggregateResponses
      assignRoleToPartsAndValidateSendMessageRequest
      buildFetchOptions
      constructRequest
      countTokens
      formatBlockErrorMessage
      formatGenerateContentInput
      formatNewContent
      formatSystemInstruction
      generateContent
      generateContentStream
      generateResponseSequence
      getClientHeaders
      getFunctionCalls
      getHeaders
      getResponsePromise
      getResponseStream
      getText
      hadBadFinishReason
      makeRequest
      processStream
      registerVertex
      validateChatHistory

      + formatSystemInstruction

    • getGenerativeModel

      Size

      TypeBase (1aadc47)Merge (392380a)Diff
      size15.9 kB16.2 kB+318 B (+2.0%)
      size-with-ext-deps34.3 kB34.7 kB+318 B (+0.9%)

      Dependency

      TypeBase (1aadc47)Merge (392380a)Diff
      functions

      24 dependencies

      addHelpers
      aggregateResponses
      assignRoleToPartsAndValidateSendMessageRequest
      buildFetchOptions
      constructRequest
      countTokens
      formatBlockErrorMessage
      formatGenerateContentInput
      formatNewContent
      generateContent
      generateContentStream
      generateResponseSequence
      getClientHeaders
      getFunctionCalls
      getGenerativeModel
      getHeaders
      getResponsePromise
      getResponseStream
      getText
      hadBadFinishReason
      makeRequest
      processStream
      registerVertex
      validateChatHistory

      25 dependencies

      addHelpers
      aggregateResponses
      assignRoleToPartsAndValidateSendMessageRequest
      buildFetchOptions
      constructRequest
      countTokens
      formatBlockErrorMessage
      formatGenerateContentInput
      formatNewContent
      formatSystemInstruction
      generateContent
      generateContentStream
      generateResponseSequence
      getClientHeaders
      getFunctionCalls
      getGenerativeModel
      getHeaders
      getResponsePromise
      getResponseStream
      getText
      hadBadFinishReason
      makeRequest
      processStream
      registerVertex
      validateChatHistory

      + formatSystemInstruction

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/M7C0LfGNwo.html

@hsubox76 hsubox76 marked this pull request as ready for review April 26, 2024 21:50
@hsubox76 hsubox76 requested a review from a team as a code owner April 26, 2024 21:50
@hsubox76 hsubox76 merged commit 627b561 into ch-vertex-feature Apr 29, 2024
39 of 41 checks passed
@hsubox76 hsubox76 deleted the ch-si-shortcut branch April 29, 2024 18:34
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.

None yet

3 participants