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.16 to 0.1.17

10

lib/apollo.ai/ApolloAiClient.d.ts

@@ -26,2 +26,10 @@ export interface IAutoAbstractResponse {

}
export interface IArticle {
id: string;
headline?: string;
content: string;
url?: string;
date?: Date;
abstract?: string[];
}
export interface IAbstractInputBody {

@@ -39,2 +47,3 @@ headline?: string;

clusteringEndpoint: string;
continuedClusteringEndpoint: string;
autoAbstractEndpoint: string;

@@ -46,2 +55,3 @@ constructor(apiKey: string);

clustering(articles: IClusteringArticle[], threshold?: number, language?: ClusteringLanguage): Promise<IClusteringResponse>;
continuedClustering(newArticles: IArticle[] | string[], presentArticles?: IArticle[], abstractMaxChars?: number): Promise<any>;
}

@@ -23,2 +23,3 @@ "use strict";

this.clusteringEndpoint = 'clustering';
this.continuedClusteringEndpoint = 'https://beta.apollo.ai/api/combinedapi';
this.autoAbstractEndpoint = 'autoabstract';

@@ -93,4 +94,25 @@ }

}
continuedClustering(newArticles, presentArticles = [], abstractMaxChars = 500) {
return __awaiter(this, void 0, void 0, function* () {
const url = new URL.URL(this.continuedClusteringEndpoint);
const parameters = {
newArticles,
result: presentArticles,
abstractMaxChars,
};
const clusteringResult = yield node_fetch_1.default(url.toString(), {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + this.apiKey,
},
body: JSON.stringify(parameters),
timeout: 300000,
});
return yield clusteringResult.json();
});
}
}
exports.ApolloAiClient = ApolloAiClient;
//# sourceMappingURL=ApolloAiClient.js.map

2

package.json
{
"name": "apollo-ai-api-client",
"version": "0.1.16",
"version": "0.1.17",
"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