Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cohere-ai

Package Overview
Dependencies
Maintainers
3
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cohere-ai - npm Package Compare versions

Comparing version 3.1.0 to 3.2.0

5

dist/cohere.d.ts

@@ -7,2 +7,3 @@ import * as models from './models';

chooseBest(model: string, config: models.chooseBest): Promise<models.cohereResponse<models.scores>>;
extract(model: string, config: models.extract): Promise<models.cohereResponse<models.extraction[]>>;
}

@@ -33,4 +34,8 @@ declare class Cohere implements CohereService {

classify(model: string, config: models.classify): Promise<models.cohereResponse<models.classifications>>;
/**
* Extract text from texts, with examples
*/
extract(model: string, config: models.extract): Promise<models.cohereResponse<models.extraction[]>>;
}
declare const cohere: Cohere;
export = cohere;

@@ -40,2 +40,3 @@ (function webpackUniversalModuleDefinition(root, factory) {

ENDPOINT["CLASSIFY"] = "/classify";
ENDPOINT["EXTRACT"] = "/extract";
})(ENDPOINT || (ENDPOINT = {}));

@@ -108,2 +109,8 @@ var COHERE_EMBED_BATCH_SIZE = 5;

};
/**
* Extract text from texts, with examples
*/
Cohere.prototype.extract = function (model, config) {
return this.makeRequest(model, ENDPOINT.EXTRACT, config);
};
return Cohere;

@@ -110,0 +117,0 @@ }());

22

dist/models/index.ts

@@ -75,3 +75,3 @@ export interface cohereResponse<T> {

export type cohereParameters = generate | embed | chooseBest | classify;
export type cohereParameters = generate | embed | chooseBest | classify | extract;

@@ -141,2 +141,22 @@ /* -- responses -- */

export interface extraction {
id: string;
text: string;
entities: extractEntity[];
}
export interface extractEntity {
type: string;
value: string;
}
export interface extractExample {
text: string;
entities: extractEntity[];
}
export interface extract {
examples: extractExample[];
texts: string[];
}
export interface error {

@@ -143,0 +163,0 @@ /** Text explaining what went wrong. */

2

package.json
{
"name": "cohere-ai",
"version": "3.1.0",
"version": "3.2.0",
"description": "A Node.js SDK with TypeScript support for the Cohere API.",

@@ -5,0 +5,0 @@ "homepage": "https://docs.cohere.ai",

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