@promptbook/azure-openai
Advanced tools
Comparing version
@@ -15,2 +15,3 @@ import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version'; | ||
import { _OpenAiAssistantMetadataRegistration } from '../llm-providers/openai/register-configuration'; | ||
import { _OpenAiCompatibleMetadataRegistration } from '../llm-providers/openai/register-configuration'; | ||
import { _OpenAiRegistration } from '../llm-providers/openai/register-constructor'; | ||
@@ -46,2 +47,3 @@ import { _OpenAiAssistantRegistration } from '../llm-providers/openai/register-constructor'; | ||
export { _OpenAiAssistantMetadataRegistration }; | ||
export { _OpenAiCompatibleMetadataRegistration }; | ||
export { _OpenAiRegistration }; | ||
@@ -48,0 +50,0 @@ export { _OpenAiAssistantRegistration }; |
@@ -114,2 +114,3 @@ import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version'; | ||
import { _OpenAiAssistantMetadataRegistration } from '../llm-providers/openai/register-configuration'; | ||
import { _OpenAiCompatibleMetadataRegistration } from '../llm-providers/openai/register-configuration'; | ||
import { migratePipeline } from '../migrations/migratePipeline'; | ||
@@ -263,2 +264,3 @@ import { preparePersona } from '../personas/preparePersona'; | ||
export { _OpenAiAssistantMetadataRegistration }; | ||
export { _OpenAiCompatibleMetadataRegistration }; | ||
export { migratePipeline }; | ||
@@ -265,0 +267,0 @@ export { preparePersona }; |
import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version'; | ||
import { createOpenAiAssistantExecutionTools } from '../llm-providers/openai/createOpenAiAssistantExecutionTools'; | ||
import { createOpenAiCompatibleExecutionTools } from '../llm-providers/openai/createOpenAiCompatibleExecutionTools'; | ||
import { createOpenAiExecutionTools } from '../llm-providers/openai/createOpenAiExecutionTools'; | ||
@@ -8,2 +9,3 @@ import { OPENAI_MODELS } from '../llm-providers/openai/openai-models'; | ||
import { OpenAiCompatibleExecutionTools } from '../llm-providers/openai/OpenAiCompatibleExecutionTools'; | ||
import type { OpenAiCompatibleExecutionToolsOptions } from '../llm-providers/openai/OpenAiCompatibleExecutionToolsOptions'; | ||
import { OpenAiExecutionTools } from '../llm-providers/openai/OpenAiExecutionTools'; | ||
@@ -15,2 +17,3 @@ import type { OpenAiExecutionToolsOptions } from '../llm-providers/openai/OpenAiExecutionToolsOptions'; | ||
export { createOpenAiAssistantExecutionTools }; | ||
export { createOpenAiCompatibleExecutionTools }; | ||
export { createOpenAiExecutionTools }; | ||
@@ -21,2 +24,3 @@ export { OPENAI_MODELS }; | ||
export { OpenAiCompatibleExecutionTools }; | ||
export type { OpenAiCompatibleExecutionToolsOptions }; | ||
export { OpenAiExecutionTools }; | ||
@@ -23,0 +27,0 @@ export type { OpenAiExecutionToolsOptions }; |
@@ -84,2 +84,3 @@ import type { PipelineCollection } from '../collection/PipelineCollection'; | ||
import type { OpenAiAssistantExecutionToolsOptions } from '../llm-providers/openai/OpenAiAssistantExecutionToolsOptions'; | ||
import type { OpenAiCompatibleExecutionToolsOptions } from '../llm-providers/openai/OpenAiCompatibleExecutionToolsOptions'; | ||
import type { OpenAiExecutionToolsOptions } from '../llm-providers/openai/OpenAiExecutionToolsOptions'; | ||
@@ -384,2 +385,3 @@ import type { VercelExecutionToolsOptions } from '../llm-providers/vercel/VercelExecutionToolsOptions'; | ||
export type { OpenAiAssistantExecutionToolsOptions }; | ||
export type { OpenAiCompatibleExecutionToolsOptions }; | ||
export type { OpenAiExecutionToolsOptions }; | ||
@@ -386,0 +388,0 @@ export type { VercelExecutionToolsOptions }; |
@@ -14,2 +14,3 @@ import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version'; | ||
import { _OpenAiAssistantMetadataRegistration } from '../llm-providers/openai/register-configuration'; | ||
import { _OpenAiCompatibleMetadataRegistration } from '../llm-providers/openai/register-configuration'; | ||
import { _OpenAiRegistration } from '../llm-providers/openai/register-constructor'; | ||
@@ -45,2 +46,3 @@ import { _OpenAiAssistantRegistration } from '../llm-providers/openai/register-constructor'; | ||
export { _OpenAiAssistantMetadataRegistration }; | ||
export { _OpenAiCompatibleMetadataRegistration }; | ||
export { _OpenAiRegistration }; | ||
@@ -47,0 +49,0 @@ export { _OpenAiAssistantRegistration }; |
import type { ClientOptions } from 'openai'; | ||
import type { string_token } from '../../types/typeAliases'; | ||
import type { OpenAiExecutionToolsOptions } from './OpenAiExecutionToolsOptions'; | ||
import type { OpenAiCompatibleExecutionToolsOptions } from './OpenAiCompatibleExecutionToolsOptions'; | ||
/** | ||
@@ -9,3 +9,3 @@ * Options for `createOpenAiAssistantExecutionTools` and `OpenAiAssistantExecutionTools` | ||
*/ | ||
export type OpenAiAssistantExecutionToolsOptions = OpenAiExecutionToolsOptions & ClientOptions & { | ||
export type OpenAiAssistantExecutionToolsOptions = OpenAiCompatibleExecutionToolsOptions & ClientOptions & { | ||
/** | ||
@@ -12,0 +12,0 @@ * Which assistant to use |
@@ -14,3 +14,3 @@ import OpenAI from 'openai'; | ||
import { computeOpenAiUsage } from './computeOpenAiUsage'; | ||
import type { OpenAiExecutionToolsOptions } from './OpenAiExecutionToolsOptions'; | ||
import type { OpenAiCompatibleExecutionToolsOptions } from './OpenAiCompatibleExecutionToolsOptions'; | ||
/** | ||
@@ -22,3 +22,3 @@ * Execution Tools for calling OpenAI API or other OpeenAI compatible provider | ||
export declare abstract class OpenAiCompatibleExecutionTools implements LlmExecutionTools { | ||
protected readonly options: OpenAiExecutionToolsOptions; | ||
protected readonly options: OpenAiCompatibleExecutionToolsOptions; | ||
/** | ||
@@ -37,3 +37,3 @@ * OpenAI API client. | ||
*/ | ||
constructor(options: OpenAiExecutionToolsOptions); | ||
constructor(options: OpenAiCompatibleExecutionToolsOptions); | ||
abstract get title(): string_title & string_markdown_text; | ||
@@ -40,0 +40,0 @@ abstract get description(): string_markdown; |
@@ -1,11 +0,9 @@ | ||
import type { ClientOptions } from 'openai'; | ||
import type { CommonToolsOptions } from '../../execution/CommonToolsOptions'; | ||
import type { OpenAiCompatibleExecutionToolsOptions } from './OpenAiCompatibleExecutionToolsOptions'; | ||
/** | ||
* Options for `createOpenAiExecutionTools` and `OpenAiExecutionTools` | ||
* | ||
* This extends OpenAI's `ClientOptions` with are directly passed to the OpenAI client. | ||
* Rest is used by the `OpenAiExecutionTools`. | ||
* This extends OpenAiCompatibleExecutionToolsOptions. | ||
* | ||
* @public exported from `@promptbook/openai` | ||
*/ | ||
export type OpenAiExecutionToolsOptions = CommonToolsOptions & ClientOptions; | ||
export type OpenAiExecutionToolsOptions = OpenAiCompatibleExecutionToolsOptions; |
@@ -23,3 +23,14 @@ import type { Registration } from '../../utils/$Register'; | ||
/** | ||
* Registration of the OpenAI Compatible metadata | ||
* | ||
* Note: OpenAiCompatibleExecutionTools is an abstract class and cannot be instantiated directly. | ||
* It serves as a base class for OpenAiExecutionTools and other compatible implementations. | ||
* | ||
* @public exported from `@promptbook/core` | ||
* @public exported from `@promptbook/wizard` | ||
* @public exported from `@promptbook/cli` | ||
*/ | ||
export declare const _OpenAiCompatibleMetadataRegistration: Registration; | ||
/** | ||
* Note: [π] Ignore a discrepancy between file name and entity name | ||
*/ |
@@ -23,4 +23,8 @@ import type { Registration } from '../../utils/$Register'; | ||
/** | ||
* Note: OpenAiCompatibleExecutionTools is an abstract class and cannot be registered directly. | ||
* It serves as a base class for OpenAiExecutionTools and other compatible implementations. | ||
*/ | ||
/** | ||
* TODO: [πΆ] Naming "constructor" vs "creator" vs "factory" | ||
* Note: [π] Ignore a discrepancy between file name and entity name | ||
*/ |
@@ -18,3 +18,3 @@ import type { string_semantic_version } from './types/typeAliases'; | ||
* Represents the version string of the Promptbook engine. | ||
* It follows semantic versioning (e.g., `0.98.0-1`). | ||
* It follows semantic versioning (e.g., `0.98.0-2`). | ||
* | ||
@@ -21,0 +21,0 @@ * @generated |
{ | ||
"name": "@promptbook/azure-openai", | ||
"version": "0.98.0-2", | ||
"version": "0.98.0-3", | ||
"description": "Promptbook: Run AI apps in plain human language across multiple models and platforms", | ||
@@ -77,3 +77,3 @@ "private": false, | ||
"peerDependencies": { | ||
"@promptbook/core": "0.98.0-2" | ||
"@promptbook/core": "0.98.0-3" | ||
}, | ||
@@ -80,0 +80,0 @@ "dependencies": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
997212
0.29%740
0.27%20185
0.26%