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

@promptbook/core

Package Overview
Dependencies
Maintainers
1
Versions
502
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@promptbook/core - npm Package Compare versions

Comparing version 0.31.0-0 to 0.31.0-1

esm/typings/execution/plugins/natural-execution-tools/openai/computeOpenaiUsage.d.ts

39

esm/typings/execution/PromptResult.d.ts

@@ -1,2 +0,2 @@

import type { string_model_name } from '.././types/typeAliases';
import type { number_positive_or_zero, number_tokens, number_usd, string_date_iso8601, string_model_name } from '.././types/typeAliases';
/**

@@ -29,2 +29,38 @@ * Prompt result is the simplest concept of execution.

/**
* Timing
*/
readonly timing: {
/**
* Start of the execution
*/
start: string_date_iso8601;
/**
* First token generated
*/
firstToken?: string_date_iso8601;
/**
* End of the execution
*/
complete: string_date_iso8601;
};
/**
* Usage of the prompt execution
*/
readonly usage: {
/**
* Cost of the execution in USD
*
* If the cost is unknown, the value is `'UNKNOWN'`
*/
price: (number_positive_or_zero & number_usd) | 'UNKNOWN';
/**
* Number of tokens used in the input aka. `prompt_tokens`
*/
inputTokens: number_tokens;
/**
* Number of tokens used in the output aka. `completion_tokens`
*/
outputTokens: number_tokens;
};
/**
* Raw response from the model

@@ -35,2 +71,3 @@ */

/**
* TODO: [🧠] Maybe timing more accurate then seconds?
* TODO: [🧠] Should here be link to the prompt?

@@ -37,0 +74,0 @@ * TODO: [🧠] Maybe type raw properly - not onject but OpenAI.result.whatever

@@ -407,2 +407,18 @@ /**

export type string_pgp_key = string;
/**
* Semantic helper for `Date.toISOString()` result
*
* @example "2011-10-05T14:48:00.000Z".
* @see https://en.wikipedia.org/wiki/ISO_8601
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString
*/
export type string_date_iso8601 = `${number}-${number}-${number}${string}${number}:${number}:${number}${string}`;
/**
* Semantic helper for US Dollars
*/
export type number_usd = number;
/**
* Semantic helper for number of tokens
*/
export type number_tokens = number_integer & number_positive_or_zero;
export type number_positive = number;

@@ -409,0 +425,0 @@ export type number_negative = number;

2

package.json
{
"name": "@promptbook/core",
"version": "0.31.0-0",
"version": "0.31.0-1",
"description": "Library to supercharge your use of large language models",

@@ -5,0 +5,0 @@ "private": false,

@@ -1,2 +0,2 @@

import type { string_model_name } from '.././types/typeAliases';
import type { number_positive_or_zero, number_tokens, number_usd, string_date_iso8601, string_model_name } from '.././types/typeAliases';
/**

@@ -29,2 +29,38 @@ * Prompt result is the simplest concept of execution.

/**
* Timing
*/
readonly timing: {
/**
* Start of the execution
*/
start: string_date_iso8601;
/**
* First token generated
*/
firstToken?: string_date_iso8601;
/**
* End of the execution
*/
complete: string_date_iso8601;
};
/**
* Usage of the prompt execution
*/
readonly usage: {
/**
* Cost of the execution in USD
*
* If the cost is unknown, the value is `'UNKNOWN'`
*/
price: (number_positive_or_zero & number_usd) | 'UNKNOWN';
/**
* Number of tokens used in the input aka. `prompt_tokens`
*/
inputTokens: number_tokens;
/**
* Number of tokens used in the output aka. `completion_tokens`
*/
outputTokens: number_tokens;
};
/**
* Raw response from the model

@@ -35,2 +71,3 @@ */

/**
* TODO: [🧠] Maybe timing more accurate then seconds?
* TODO: [🧠] Should here be link to the prompt?

@@ -37,0 +74,0 @@ * TODO: [🧠] Maybe type raw properly - not onject but OpenAI.result.whatever

@@ -407,2 +407,18 @@ /**

export type string_pgp_key = string;
/**
* Semantic helper for `Date.toISOString()` result
*
* @example "2011-10-05T14:48:00.000Z".
* @see https://en.wikipedia.org/wiki/ISO_8601
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString
*/
export type string_date_iso8601 = `${number}-${number}-${number}${string}${number}:${number}:${number}${string}`;
/**
* Semantic helper for US Dollars
*/
export type number_usd = number;
/**
* Semantic helper for number of tokens
*/
export type number_tokens = number_integer & number_positive_or_zero;
export type number_positive = number;

@@ -409,0 +425,0 @@ export type number_negative = number;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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