@promptbook/fake-llm
Advanced tools
Comparing version 0.66.0-6 to 0.66.0-7
@@ -8,3 +8,3 @@ import { spaceTrim } from 'spacetrim'; | ||
*/ | ||
var PROMPTBOOK_VERSION = '0.66.0-5'; | ||
var PROMPTBOOK_VERSION = '0.66.0-6'; | ||
// TODO: !!!! List here all the versions and annotate + put into script | ||
@@ -393,2 +393,24 @@ | ||
/** | ||
* Does nothing, just to implement the interface | ||
*/ | ||
MockedEchoLlmExecutionTools.prototype.checkConfiguration = function () { }; | ||
/** | ||
* List all available mocked-models that can be used | ||
*/ | ||
MockedEchoLlmExecutionTools.prototype.listModels = function () { | ||
return [ | ||
{ | ||
modelTitle: 'Echo chat', | ||
modelName: 'mocked-echo', | ||
modelVariant: 'CHAT', | ||
}, | ||
{ | ||
modelTitle: 'Echo completion', | ||
modelName: 'mocked-echo', | ||
modelVariant: 'COMPLETION', | ||
}, | ||
// <- Note: [๐ค] | ||
]; | ||
}; | ||
/** | ||
* Mocks chat model | ||
@@ -457,21 +479,2 @@ */ | ||
}; | ||
// <- Note: [๐ค] callXxxModel | ||
/** | ||
* List all available mocked-models that can be used | ||
*/ | ||
MockedEchoLlmExecutionTools.prototype.listModels = function () { | ||
return [ | ||
{ | ||
modelTitle: 'Echo chat', | ||
modelName: 'mocked-echo', | ||
modelVariant: 'CHAT', | ||
}, | ||
{ | ||
modelTitle: 'Echo completion', | ||
modelName: 'mocked-echo', | ||
modelVariant: 'COMPLETION', | ||
}, | ||
// <- Note: [๐ค] | ||
]; | ||
}; | ||
return MockedEchoLlmExecutionTools; | ||
@@ -1012,2 +1015,24 @@ }()); | ||
/** | ||
* Does nothing, just to implement the interface | ||
*/ | ||
MockedFackedLlmExecutionTools.prototype.checkConfiguration = function () { }; | ||
/** | ||
* List all available fake-models that can be used | ||
*/ | ||
MockedFackedLlmExecutionTools.prototype.listModels = function () { | ||
return [ | ||
{ | ||
modelTitle: 'Fake chat', | ||
modelName: 'mocked-echo', | ||
modelVariant: 'CHAT', | ||
}, | ||
{ | ||
modelTitle: 'Fake completion', | ||
modelName: 'mocked-echo', | ||
modelVariant: 'COMPLETION', | ||
}, | ||
// <- Note: [๐ค] | ||
]; | ||
}; | ||
/** | ||
* Fakes chat model | ||
@@ -1102,21 +1127,2 @@ */ | ||
}; | ||
// <- Note: [๐ค] callXxxModel | ||
/** | ||
* List all available fake-models that can be used | ||
*/ | ||
MockedFackedLlmExecutionTools.prototype.listModels = function () { | ||
return [ | ||
{ | ||
modelTitle: 'Fake chat', | ||
modelName: 'mocked-echo', | ||
modelVariant: 'CHAT', | ||
}, | ||
{ | ||
modelTitle: 'Fake completion', | ||
modelName: 'mocked-echo', | ||
modelVariant: 'COMPLETION', | ||
}, | ||
// <- Note: [๐ค] | ||
]; | ||
}; | ||
return MockedFackedLlmExecutionTools; | ||
@@ -1123,0 +1129,0 @@ }()); |
import { PROMPTBOOK_VERSION } from '../version'; | ||
import { __CLI } from '../cli/main'; | ||
import { _CLI } from '../cli/main'; | ||
import { _AnthropicClaudeMetadataRegistration } from '../llm-providers/anthropic-claude/register-configuration'; | ||
import { _OpenAiMetadataRegistration } from '../llm-providers/openai/register-configuration'; | ||
export { PROMPTBOOK_VERSION }; | ||
export { __CLI }; | ||
export { _CLI }; | ||
export { _AnthropicClaudeMetadataRegistration }; | ||
export { _OpenAiMetadataRegistration }; |
@@ -7,4 +7,4 @@ import { promptbookCli } from './promptbookCli'; | ||
*/ | ||
export declare const __CLI: { | ||
__initialize: typeof promptbookCli; | ||
export declare const _CLI: { | ||
_initialize: typeof promptbookCli; | ||
}; | ||
@@ -11,0 +11,0 @@ /** |
@@ -36,2 +36,3 @@ import type { Promisable } from 'type-fest'; | ||
*/ | ||
checkConfiguration(): Promisable<void>; | ||
/** | ||
@@ -38,0 +39,0 @@ * List all available models that can be used |
@@ -1,1 +0,1 @@ | ||
import '../../../_packages/core.index'; | ||
export {}; |
@@ -1,4 +0,4 @@ | ||
import '../../../_packages/core.index'; | ||
export {}; | ||
/** | ||
* TODO: [๐] Maybe test all file in samples (not just 10-simple.md) | ||
*/ |
@@ -1,1 +0,1 @@ | ||
import '../../../_packages/core.index'; | ||
export {}; |
@@ -0,1 +1,2 @@ | ||
import '../../_packages/core.index'; | ||
import type { CreateLlmToolsFromConfigurationOptions } from './createLlmToolsFromConfiguration'; | ||
@@ -2,0 +3,0 @@ import type { LlmExecutionToolsWithTotalUsage } from './utils/count-total-usage/LlmExecutionToolsWithTotalUsage'; |
@@ -20,3 +20,3 @@ import type { AvailableModel } from '../../execution/AvailableModel'; | ||
*/ | ||
private readonly client; | ||
private client; | ||
/** | ||
@@ -30,3 +30,12 @@ * Creates Anthropic Claude Execution Tools. | ||
get description(): string_markdown; | ||
private getClient; | ||
/** | ||
* Check the `options` passed to `constructor` | ||
*/ | ||
checkConfiguration(): Promise<void>; | ||
/** | ||
* List all available Anthropic Claude models that can be used | ||
*/ | ||
listModels(): Array<AvailableModel>; | ||
/** | ||
* Calls Anthropic Claude API to use a chat model. | ||
@@ -43,6 +52,2 @@ */ | ||
private getDefaultChatModel; | ||
/** | ||
* List all available Anthropic Claude models that can be used | ||
*/ | ||
listModels(): Array<AvailableModel>; | ||
} | ||
@@ -49,0 +54,0 @@ /** |
@@ -20,3 +20,3 @@ import type { AvailableModel } from '../../execution/AvailableModel'; | ||
*/ | ||
private readonly client; | ||
private client; | ||
/** | ||
@@ -30,3 +30,12 @@ * Creates OpenAI Execution Tools. | ||
get description(): string_markdown; | ||
private getClient; | ||
/** | ||
* Check the `options` passed to `constructor` | ||
*/ | ||
checkConfiguration(): Promise<void>; | ||
/** | ||
* List all available Azure OpenAI models that can be used | ||
*/ | ||
listModels(): Promise<Array<AvailableModel>>; | ||
/** | ||
* Calls OpenAI API to use a chat model. | ||
@@ -43,6 +52,2 @@ */ | ||
private transformAzureError; | ||
/** | ||
* List all available Azure OpenAI models that can be used | ||
*/ | ||
listModels(): Promise<Array<AvailableModel>>; | ||
} | ||
@@ -49,0 +54,0 @@ /** |
@@ -21,2 +21,10 @@ import type { AvailableModel } from '../../execution/AvailableModel'; | ||
/** | ||
* Does nothing, just to implement the interface | ||
*/ | ||
checkConfiguration(): void; | ||
/** | ||
* List all available mocked-models that can be used | ||
*/ | ||
listModels(): Array<AvailableModel>; | ||
/** | ||
* Mocks chat model | ||
@@ -29,6 +37,2 @@ */ | ||
callCompletionModel(prompt: Pick<Prompt, 'content' | 'parameters' | 'modelRequirements'>): Promise<CompletionPromptResult>; | ||
/** | ||
* List all available mocked-models that can be used | ||
*/ | ||
listModels(): Array<AvailableModel>; | ||
} | ||
@@ -35,0 +39,0 @@ /** |
@@ -22,2 +22,10 @@ import type { AvailableModel } from '../../execution/AvailableModel'; | ||
/** | ||
* Does nothing, just to implement the interface | ||
*/ | ||
checkConfiguration(): void; | ||
/** | ||
* List all available fake-models that can be used | ||
*/ | ||
listModels(): Array<AvailableModel>; | ||
/** | ||
* Fakes chat model | ||
@@ -34,6 +42,2 @@ */ | ||
callEmbeddingModel(prompt: Pick<Prompt, 'content' | 'parameters' | 'modelRequirements' | 'expectations' | 'postprocessing'>): Promise<EmbeddingPromptResult>; | ||
/** | ||
* List all available fake-models that can be used | ||
*/ | ||
listModels(): Array<AvailableModel>; | ||
} | ||
@@ -40,0 +44,0 @@ /** |
@@ -32,2 +32,11 @@ import type { AvailableModel } from '../../execution/AvailableModel'; | ||
/** | ||
* Check the configuration of all execution tools | ||
*/ | ||
checkConfiguration(): Promise<void>; | ||
/** | ||
* List all available models that can be used | ||
* This lists is a combination of all available models from all execution tools | ||
*/ | ||
listModels(): Promise<Array<AvailableModel>>; | ||
/** | ||
* Calls the best available chat model | ||
@@ -50,7 +59,2 @@ */ | ||
callCommonModel(prompt: Prompt): Promise<PromptResult>; | ||
/** | ||
* List all available models that can be used | ||
* This lists is a combination of all available models from all execution tools | ||
*/ | ||
listModels(): Promise<Array<AvailableModel>>; | ||
} | ||
@@ -57,0 +61,0 @@ /** |
@@ -21,3 +21,3 @@ import type { AvailableModel } from '../../execution/AvailableModel'; | ||
*/ | ||
private readonly client; | ||
private client; | ||
/** | ||
@@ -31,3 +31,12 @@ * Creates OpenAI Execution Tools. | ||
get description(): string_markdown; | ||
private getClient; | ||
/** | ||
* Check the `options` passed to `constructor` | ||
*/ | ||
checkConfiguration(): Promise<void>; | ||
/** | ||
* List all available OpenAI models that can be used | ||
*/ | ||
listModels(): Array<AvailableModel>; | ||
/** | ||
* Calls OpenAI API to use a chat model. | ||
@@ -60,6 +69,2 @@ */ | ||
private getDefaultEmbeddingModel; | ||
/** | ||
* List all available OpenAI models that can be used | ||
*/ | ||
listModels(): Array<AvailableModel>; | ||
} | ||
@@ -66,0 +71,0 @@ /** |
@@ -28,2 +28,10 @@ import type { AvailableModel } from '../../execution/AvailableModel'; | ||
/** | ||
* Check the configuration of all execution tools | ||
*/ | ||
checkConfiguration(): Promise<void>; | ||
/** | ||
* List all available models that can be used | ||
*/ | ||
listModels(): Promise<Array<AvailableModel>>; | ||
/** | ||
* Creates a connection to the remote proxy server. | ||
@@ -48,6 +56,2 @@ */ | ||
private callCommonModel; | ||
/** | ||
* List all available models that can be used | ||
*/ | ||
listModels(): Promise<Array<AvailableModel>>; | ||
} | ||
@@ -54,0 +58,0 @@ /** |
@@ -1,1 +0,1 @@ | ||
import '../../src/_packages/core.index'; | ||
export {}; |
{ | ||
"name": "@promptbook/fake-llm", | ||
"version": "0.66.0-6", | ||
"version": "0.66.0-7", | ||
"description": "Supercharge your use of large language models", | ||
@@ -50,3 +50,3 @@ "private": false, | ||
"peerDependencies": { | ||
"@promptbook/core": "0.66.0-6" | ||
"@promptbook/core": "0.66.0-7" | ||
}, | ||
@@ -53,0 +53,0 @@ "dependencies": { |
@@ -11,3 +11,3 @@ (function (global, factory) { | ||
*/ | ||
var PROMPTBOOK_VERSION = '0.66.0-5'; | ||
var PROMPTBOOK_VERSION = '0.66.0-6'; | ||
// TODO: !!!! List here all the versions and annotate + put into script | ||
@@ -396,2 +396,24 @@ | ||
/** | ||
* Does nothing, just to implement the interface | ||
*/ | ||
MockedEchoLlmExecutionTools.prototype.checkConfiguration = function () { }; | ||
/** | ||
* List all available mocked-models that can be used | ||
*/ | ||
MockedEchoLlmExecutionTools.prototype.listModels = function () { | ||
return [ | ||
{ | ||
modelTitle: 'Echo chat', | ||
modelName: 'mocked-echo', | ||
modelVariant: 'CHAT', | ||
}, | ||
{ | ||
modelTitle: 'Echo completion', | ||
modelName: 'mocked-echo', | ||
modelVariant: 'COMPLETION', | ||
}, | ||
// <- Note: [๐ค] | ||
]; | ||
}; | ||
/** | ||
* Mocks chat model | ||
@@ -460,21 +482,2 @@ */ | ||
}; | ||
// <- Note: [๐ค] callXxxModel | ||
/** | ||
* List all available mocked-models that can be used | ||
*/ | ||
MockedEchoLlmExecutionTools.prototype.listModels = function () { | ||
return [ | ||
{ | ||
modelTitle: 'Echo chat', | ||
modelName: 'mocked-echo', | ||
modelVariant: 'CHAT', | ||
}, | ||
{ | ||
modelTitle: 'Echo completion', | ||
modelName: 'mocked-echo', | ||
modelVariant: 'COMPLETION', | ||
}, | ||
// <- Note: [๐ค] | ||
]; | ||
}; | ||
return MockedEchoLlmExecutionTools; | ||
@@ -1015,2 +1018,24 @@ }()); | ||
/** | ||
* Does nothing, just to implement the interface | ||
*/ | ||
MockedFackedLlmExecutionTools.prototype.checkConfiguration = function () { }; | ||
/** | ||
* List all available fake-models that can be used | ||
*/ | ||
MockedFackedLlmExecutionTools.prototype.listModels = function () { | ||
return [ | ||
{ | ||
modelTitle: 'Fake chat', | ||
modelName: 'mocked-echo', | ||
modelVariant: 'CHAT', | ||
}, | ||
{ | ||
modelTitle: 'Fake completion', | ||
modelName: 'mocked-echo', | ||
modelVariant: 'COMPLETION', | ||
}, | ||
// <- Note: [๐ค] | ||
]; | ||
}; | ||
/** | ||
* Fakes chat model | ||
@@ -1105,21 +1130,2 @@ */ | ||
}; | ||
// <- Note: [๐ค] callXxxModel | ||
/** | ||
* List all available fake-models that can be used | ||
*/ | ||
MockedFackedLlmExecutionTools.prototype.listModels = function () { | ||
return [ | ||
{ | ||
modelTitle: 'Fake chat', | ||
modelName: 'mocked-echo', | ||
modelVariant: 'CHAT', | ||
}, | ||
{ | ||
modelTitle: 'Fake completion', | ||
modelName: 'mocked-echo', | ||
modelVariant: 'COMPLETION', | ||
}, | ||
// <- Note: [๐ค] | ||
]; | ||
}; | ||
return MockedFackedLlmExecutionTools; | ||
@@ -1126,0 +1132,0 @@ }()); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
539186
10113