New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@google/generative-ai

Package Overview
Dependencies
Maintainers
4
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@google/generative-ai - npm Package Compare versions

Comparing version 0.7.1 to 0.8.0

dist/files/files.d.ts

31

dist/generative-ai.d.ts

@@ -169,3 +169,3 @@ /**

* Deprecated: use `functionCalls()` instead.
* @deprecated
* @deprecated - use `functionCalls()` instead
*/

@@ -182,2 +182,23 @@ functionCall: () => FunctionCall | undefined;

/**
* Data pointing to a file uploaded with the Files API.
* @public
*/
export declare interface FileData {
mimeType: string;
fileUri: string;
}
/**
* Content part interface if the part represents FunctionResponse.
* @public
*/
export declare interface FileDataPart {
text?: never;
inlineData?: never;
functionCall?: never;
functionResponse?: never;
fileData: FileData;
}
/**
* Reason that a candidate finished.

@@ -233,2 +254,3 @@ * @public

functionResponse?: never;
fileData?: never;
}

@@ -391,2 +413,3 @@

functionResponse: FunctionResponse;
fileData?: never;
}

@@ -580,2 +603,3 @@

functionResponse?: never;
fileData?: never;
}

@@ -598,3 +622,3 @@

*/
export declare type Part = TextPart | InlineDataPart | FunctionCallPart | FunctionResponsePart;
export declare type Part = TextPart | InlineDataPart | FunctionCallPart | FunctionResponsePart | FileDataPart;

@@ -619,3 +643,3 @@ /**

/**
* Params passed to {@link GoogleGenerativeAI.getGenerativeModel}.
* Params passed to getGenerativeModel() or GoogleAIFileManager().
* @public

@@ -695,2 +719,3 @@ */

functionResponse?: never;
fileData?: never;
}

@@ -697,0 +722,0 @@

3

dist/index.js

@@ -222,3 +222,3 @@ 'use strict';

*/
const PACKAGE_VERSION = "0.7.1";
const PACKAGE_VERSION = "0.8.0";
const PACKAGE_LOG_HEADER = "genai-js";

@@ -844,2 +844,3 @@ var Task;

functionResponse: 0,
fileData: 0,
};

@@ -846,0 +847,0 @@ for (const part of parts) {

@@ -29,3 +29,3 @@ /**

*/
export type Part = TextPart | InlineDataPart | FunctionCallPart | FunctionResponsePart;
export type Part = TextPart | InlineDataPart | FunctionCallPart | FunctionResponsePart | FileDataPart;
/**

@@ -40,2 +40,3 @@ * Content part interface if the part represents a text string.

functionResponse?: never;
fileData?: never;
}

@@ -51,2 +52,3 @@ /**

functionResponse?: never;
fileData?: never;
}

@@ -62,2 +64,3 @@ /**

functionResponse?: never;
fileData?: never;
}

@@ -73,2 +76,3 @@ /**

functionResponse: FunctionResponse;
fileData?: never;
}

@@ -109,1 +113,20 @@ /**

}
/**
* Content part interface if the part represents FunctionResponse.
* @public
*/
export interface FileDataPart {
text?: never;
inlineData?: never;
functionCall?: never;
functionResponse?: never;
fileData: FileData;
}
/**
* Data pointing to a file uploaded with the Files API.
* @public
*/
export interface FileData {
mimeType: string;
fileUri: string;
}

@@ -101,3 +101,3 @@ /**

/**
* Params passed to {@link GoogleGenerativeAI.getGenerativeModel}.
* Params passed to getGenerativeModel() or GoogleAIFileManager().
* @public

@@ -104,0 +104,0 @@ */

@@ -53,3 +53,3 @@ /**

* Deprecated: use `functionCalls()` instead.
* @deprecated
* @deprecated - use `functionCalls()` instead
*/

@@ -56,0 +56,0 @@ functionCall: () => FunctionCall | undefined;

{
"name": "@google/generative-ai",
"version": "0.7.1",
"version": "0.8.0",
"description": "Google AI JavaScript SDK",

@@ -15,2 +15,8 @@ "main": "dist/index.js",

},
"./files": {
"types": "./dist/files/files.d.ts",
"require": "./dist/files/index.js",
"import": "./dist/files/index.mjs",
"default": "./dist/files/index.js"
},
"./package.json": "./package.json"

@@ -22,3 +28,4 @@ },

"files": [
"dist"
"dist",
"files/package.json"
],

@@ -32,4 +39,4 @@ "scripts": {

"lint": "eslint -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
"api-report": "api-extractor run --local --verbose",
"docs": "yarn build && yarn api-documenter markdown -i ./temp -o ../../docs/reference/"
"api-report": "api-extractor run --local --verbose && api-extractor run -c api-extractor.files.json --local --verbose",
"docs": "yarn build && yarn api-documenter markdown -i ./temp/main -o ../../docs/reference/main && yarn api-documenter markdown -i ./temp/files -o ../../docs/reference/files"
},

@@ -36,0 +43,0 @@ "repository": {

@@ -93,3 +93,5 @@ # Google AI JavaScript SDK

Find reference docs for this SDK [here in the repo](/docs/reference/generative-ai.md).
Find reference docs for this SDK here in the repo:
- [GoogleGenerativeAI](/docs/reference/main/generative-ai.md)
- [GoogleAIFileManager](/docs/reference/files/generative-ai.googleaifilemanager.md)

@@ -96,0 +98,0 @@ ## Changelog

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc