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

@owlworks/florence-api

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@owlworks/florence-api - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

6

dist/index.d.ts

@@ -78,2 +78,3 @@ export interface IS3Configuration {

query: string;
previous_contexts?: string[];
}

@@ -84,6 +85,7 @@ export interface ISQLQueryContext {

datasourceId: string;
previous_contexts?: string[];
}
export interface IGeneratedSQL {
sql: string;
contexts?: string[];
previous_contexts?: string[];
}

@@ -102,3 +104,3 @@ export interface IOptions {

constructor(options: IOptions);
ask(datasourceId: string, query: string, contexts?: string[]): Promise<IGeneratedSQL>;
ask(datasourceId: string, query: string, previous_contexts?: string[]): Promise<IGeneratedSQL>;
addDatasource(datasourceName: string, datasourceType: string, ddl: string, glossary: string): Promise<IDataSource>;

@@ -105,0 +107,0 @@ datasources(): Promise<IDataSources>;

@@ -32,4 +32,4 @@ "use strict";

}
async ask(datasourceId, query, contexts) {
if (contexts && contexts.length > Florence.ALLOWED_CONTEXTS_SIZE) {
async ask(datasourceId, query, previous_contexts) {
if (previous_contexts && previous_contexts.length > Florence.ALLOWED_CONTEXTS_SIZE) {
throw new Error(`Maximum of ${Florence.ALLOWED_CONTEXTS_SIZE} contexts are allowed.`);

@@ -41,3 +41,4 @@ }

datasourceId: datasourceId,
query: query
query: query,
previous_contexts: previous_contexts
};

@@ -111,3 +112,4 @@ return this.getSql(context);

const sqlgenerationContext = {
query: context.query
query: context.query,
previous_contexts: context.previous_contexts
};

@@ -114,0 +116,0 @@ const response = await axios_1.default.post(`${this.apiUrl}/sql/${tenantId}/${datasourceId}`, sqlgenerationContext, {

@@ -44,3 +44,3 @@ {

"types": "dist/index.d.ts",
"version": "0.2.0"
"version": "0.3.0"
}
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