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

apollo-ai-api-client

Package Overview
Dependencies
Maintainers
4
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apollo-ai-api-client - npm Package Compare versions

Comparing version 0.1.15 to 0.1.16

4

lib/apollo.ai/ApolloAiClient.d.ts

@@ -41,5 +41,5 @@ export interface IAutoAbstractResponse {

private executeAutoabstract;
autoabstractUrl(url: string, maxCharacters?: number, keywords?: string[], maxSentences?: number): Promise<IAutoAbstractResponse>;
autoabstract(headline: string, text: string, maxCharacters?: number, keywords?: string[], maxSentences?: number): Promise<IAutoAbstractResponse>;
autoabstractUrl(url: string, maxCharacters?: number, keywords?: string[], maxSentences?: number, debug?: boolean): Promise<IAutoAbstractResponse>;
autoabstract(headline: string, text: string, maxCharacters?: number, keywords?: string[], maxSentences?: number, debug?: boolean): Promise<IAutoAbstractResponse>;
clustering(articles: IClusteringArticle[], threshold?: number, language?: ClusteringLanguage): Promise<IClusteringResponse>;
}

@@ -25,3 +25,3 @@ "use strict";

}
executeAutoabstract(body) {
executeAutoabstract(body, debug = false) {
return __awaiter(this, void 0, void 0, function* () {

@@ -35,3 +35,3 @@ const response = yield node_fetch_1.default(this.apolloApiEndpoint + this.autoAbstractEndpoint, {

},
body: JSON.stringify(body),
body: JSON.stringify(Object.assign({ debug }, body)),
});

@@ -44,7 +44,7 @@ if (response.status !== 200) {

}
autoabstractUrl(url, maxCharacters = 400, keywords, maxSentences) {
autoabstractUrl(url, maxCharacters = 400, keywords, maxSentences, debug) {
return __awaiter(this, void 0, void 0, function* () {
const body = {
url,
keywords: '',
keywords: keywords ? keywords.join(',') : '',
};

@@ -57,9 +57,6 @@ if (maxSentences) {

}
if (keywords) {
body.keywords = keywords.join(',');
}
return yield this.executeAutoabstract(body);
return yield this.executeAutoabstract(body, debug);
});
}
autoabstract(headline, text, maxCharacters = 400, keywords, maxSentences) {
autoabstract(headline, text, maxCharacters = 400, keywords, maxSentences, debug) {
return __awaiter(this, void 0, void 0, function* () {

@@ -69,3 +66,3 @@ const body = {

text,
keywords: '',
keywords: keywords ? keywords.join(',') : '',
};

@@ -78,6 +75,3 @@ if (maxSentences) {

}
if (keywords) {
body.keywords = keywords.join(',');
}
return yield this.executeAutoabstract(body);
return yield this.executeAutoabstract(body, debug);
});

@@ -84,0 +78,0 @@ }

{
"name": "apollo-ai-api-client",
"version": "0.1.15",
"version": "0.1.16",
"description": "Client for the apollo.ai auto abstract api.",

@@ -5,0 +5,0 @@ "keywords": [

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