modelfusion 0.135.1 → 0.137.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { PartialDeep } from 'type-fest';
2
- import { z } from 'zod';
2
+ import z$1, { z } from 'zod';
3
3
 
4
4
  type ErrorHandler = (error: unknown) => void;
5
5
 
@@ -463,6 +463,11 @@ declare class DefaultRun implements Run {
463
463
  readonly functionObserver: {
464
464
  onFunctionEvent: (event: FunctionEvent) => void;
465
465
  };
466
+ getSuccessfulModelCalls(): (ModelCallFinishedEvent & {
467
+ result: {
468
+ status: "success";
469
+ };
470
+ })[];
466
471
  }
467
472
 
468
473
  declare class FunctionEventSource {
@@ -3989,8 +3994,8 @@ declare class LlamaCppCompletionModel<CONTEXT_WINDOW_SIZE extends number | undef
3989
3994
  countPromptTokens(prompt: LlamaCppCompletionPrompt): Promise<number>;
3990
3995
  doGenerateTexts(prompt: LlamaCppCompletionPrompt, options: FunctionCallOptions): Promise<{
3991
3996
  rawResponse: {
3992
- prompt: string;
3993
3997
  model: string;
3998
+ prompt: string;
3994
3999
  stop: true;
3995
4000
  content: string;
3996
4001
  generation_settings: {
@@ -4049,8 +4054,8 @@ declare class LlamaCppCompletionModel<CONTEXT_WINDOW_SIZE extends number | undef
4049
4054
  }>;
4050
4055
  restoreGeneratedTexts(rawResponse: unknown): {
4051
4056
  rawResponse: {
4052
- prompt: string;
4053
4057
  model: string;
4058
+ prompt: string;
4054
4059
  stop: true;
4055
4060
  content: string;
4056
4061
  generation_settings: {
@@ -4109,8 +4114,8 @@ declare class LlamaCppCompletionModel<CONTEXT_WINDOW_SIZE extends number | undef
4109
4114
  };
4110
4115
  processTextGenerationResponse(rawResponse: LlamaCppTextGenerationResponse): {
4111
4116
  rawResponse: {
4112
- prompt: string;
4113
4117
  model: string;
4118
+ prompt: string;
4114
4119
  stop: true;
4115
4120
  content: string;
4116
4121
  generation_settings: {
@@ -4168,8 +4173,8 @@ declare class LlamaCppCompletionModel<CONTEXT_WINDOW_SIZE extends number | undef
4168
4173
  };
4169
4174
  };
4170
4175
  doStreamText(prompt: LlamaCppCompletionPrompt, options: FunctionCallOptions): Promise<AsyncIterable<Delta<{
4171
- prompt: string;
4172
4176
  model: string;
4177
+ prompt: string;
4173
4178
  stop: true;
4174
4179
  content: string;
4175
4180
  generation_settings: {
@@ -4347,8 +4352,8 @@ declare const llamaCppTextGenerationResponseSchema: z.ZodObject<{
4347
4352
  tokens_predicted: z.ZodNumber;
4348
4353
  truncated: z.ZodBoolean;
4349
4354
  }, "strip", z.ZodTypeAny, {
4350
- prompt: string;
4351
4355
  model: string;
4356
+ prompt: string;
4352
4357
  stop: true;
4353
4358
  content: string;
4354
4359
  generation_settings: {
@@ -4395,8 +4400,8 @@ declare const llamaCppTextGenerationResponseSchema: z.ZodObject<{
4395
4400
  tokens_predicted: number;
4396
4401
  truncated: boolean;
4397
4402
  }, {
4398
- prompt: string;
4399
4403
  model: string;
4404
+ prompt: string;
4400
4405
  stop: true;
4401
4406
  content: string;
4402
4407
  generation_settings: {
@@ -4568,8 +4573,8 @@ declare const llamaCppTextStreamChunkSchema: z.ZodDiscriminatedUnion<"stop", [z.
4568
4573
  tokens_predicted: z.ZodNumber;
4569
4574
  truncated: z.ZodBoolean;
4570
4575
  }, "strip", z.ZodTypeAny, {
4571
- prompt: string;
4572
4576
  model: string;
4577
+ prompt: string;
4573
4578
  stop: true;
4574
4579
  content: string;
4575
4580
  generation_settings: {
@@ -4616,8 +4621,8 @@ declare const llamaCppTextStreamChunkSchema: z.ZodDiscriminatedUnion<"stop", [z.
4616
4621
  tokens_predicted: number;
4617
4622
  truncated: boolean;
4618
4623
  }, {
4619
- prompt: string;
4620
4624
  model: string;
4625
+ prompt: string;
4621
4626
  stop: true;
4622
4627
  content: string;
4623
4628
  generation_settings: {
@@ -4676,8 +4681,8 @@ declare const LlamaCppCompletionResponseFormat: {
4676
4681
  json: {
4677
4682
  stream: false;
4678
4683
  handler: ResponseHandler<{
4679
- prompt: string;
4680
4684
  model: string;
4685
+ prompt: string;
4681
4686
  stop: true;
4682
4687
  content: string;
4683
4688
  generation_settings: {
@@ -4734,8 +4739,8 @@ declare const LlamaCppCompletionResponseFormat: {
4734
4739
  handler: ({ response }: {
4735
4740
  response: Response;
4736
4741
  }) => Promise<AsyncIterable<Delta<{
4737
- prompt: string;
4738
4742
  model: string;
4743
+ prompt: string;
4739
4744
  stop: true;
4740
4745
  content: string;
4741
4746
  generation_settings: {
@@ -5454,12 +5459,12 @@ declare class MistralTextEmbeddingModel extends AbstractModel<MistralTextEmbeddi
5454
5459
  doEmbedValues(texts: string[], options: FunctionCallOptions): Promise<{
5455
5460
  rawResponse: {
5456
5461
  object: string;
5462
+ model: string;
5457
5463
  data: {
5458
5464
  object: string;
5459
5465
  embedding: number[];
5460
5466
  index: number;
5461
5467
  }[];
5462
- model: string;
5463
5468
  usage: {
5464
5469
  prompt_tokens: number;
5465
5470
  total_tokens: number;
@@ -5499,12 +5504,12 @@ declare const MistralTextEmbeddingResponseSchema: z.ZodObject<{
5499
5504
  }>;
5500
5505
  }, "strip", z.ZodTypeAny, {
5501
5506
  object: string;
5507
+ model: string;
5502
5508
  data: {
5503
5509
  object: string;
5504
5510
  embedding: number[];
5505
5511
  index: number;
5506
5512
  }[];
5507
- model: string;
5508
5513
  usage: {
5509
5514
  prompt_tokens: number;
5510
5515
  total_tokens: number;
@@ -5512,12 +5517,12 @@ declare const MistralTextEmbeddingResponseSchema: z.ZodObject<{
5512
5517
  id: string;
5513
5518
  }, {
5514
5519
  object: string;
5520
+ model: string;
5515
5521
  data: {
5516
5522
  object: string;
5517
5523
  embedding: number[];
5518
5524
  index: number;
5519
5525
  }[];
5520
- model: string;
5521
5526
  usage: {
5522
5527
  prompt_tokens: number;
5523
5528
  total_tokens: number;
@@ -5663,11 +5668,11 @@ declare class OllamaChatModel extends AbstractModel<OllamaChatModelSettings> imp
5663
5668
  get settingsForEvent(): Partial<OllamaChatModelSettings>;
5664
5669
  doGenerateTexts(prompt: OllamaChatPrompt, options: FunctionCallOptions): Promise<{
5665
5670
  rawResponse: {
5671
+ model: string;
5666
5672
  message: {
5667
5673
  role: string;
5668
5674
  content: string;
5669
5675
  };
5670
- model: string;
5671
5676
  done: true;
5672
5677
  created_at: string;
5673
5678
  total_duration: number;
@@ -5684,11 +5689,11 @@ declare class OllamaChatModel extends AbstractModel<OllamaChatModelSettings> imp
5684
5689
  }>;
5685
5690
  restoreGeneratedTexts(rawResponse: unknown): {
5686
5691
  rawResponse: {
5692
+ model: string;
5687
5693
  message: {
5688
5694
  role: string;
5689
5695
  content: string;
5690
5696
  };
5691
- model: string;
5692
5697
  done: true;
5693
5698
  created_at: string;
5694
5699
  total_duration: number;
@@ -5705,11 +5710,11 @@ declare class OllamaChatModel extends AbstractModel<OllamaChatModelSettings> imp
5705
5710
  };
5706
5711
  private processTextGenerationResponse;
5707
5712
  doStreamText(prompt: OllamaChatPrompt, options: FunctionCallOptions): Promise<AsyncIterable<Delta<{
5713
+ model: string;
5708
5714
  message: {
5709
5715
  role: string;
5710
5716
  content: string;
5711
5717
  };
5712
- model: string;
5713
5718
  done: false;
5714
5719
  created_at: string;
5715
5720
  } | {
@@ -5755,11 +5760,11 @@ declare const ollamaChatResponseSchema: z.ZodObject<{
5755
5760
  eval_count: z.ZodNumber;
5756
5761
  eval_duration: z.ZodNumber;
5757
5762
  }, "strip", z.ZodTypeAny, {
5763
+ model: string;
5758
5764
  message: {
5759
5765
  role: string;
5760
5766
  content: string;
5761
5767
  };
5762
- model: string;
5763
5768
  done: true;
5764
5769
  created_at: string;
5765
5770
  total_duration: number;
@@ -5769,11 +5774,11 @@ declare const ollamaChatResponseSchema: z.ZodObject<{
5769
5774
  prompt_eval_count?: number | undefined;
5770
5775
  prompt_eval_duration?: number | undefined;
5771
5776
  }, {
5777
+ model: string;
5772
5778
  message: {
5773
5779
  role: string;
5774
5780
  content: string;
5775
5781
  };
5776
- model: string;
5777
5782
  done: true;
5778
5783
  created_at: string;
5779
5784
  total_duration: number;
@@ -5799,19 +5804,19 @@ declare const ollamaChatStreamChunkSchema: z.ZodDiscriminatedUnion<"done", [z.Zo
5799
5804
  content: string;
5800
5805
  }>;
5801
5806
  }, "strip", z.ZodTypeAny, {
5807
+ model: string;
5802
5808
  message: {
5803
5809
  role: string;
5804
5810
  content: string;
5805
5811
  };
5806
- model: string;
5807
5812
  done: false;
5808
5813
  created_at: string;
5809
5814
  }, {
5815
+ model: string;
5810
5816
  message: {
5811
5817
  role: string;
5812
5818
  content: string;
5813
5819
  };
5814
- model: string;
5815
5820
  done: false;
5816
5821
  created_at: string;
5817
5822
  }>, z.ZodObject<{
@@ -5861,11 +5866,11 @@ declare const OllamaChatResponseFormat: {
5861
5866
  requestBodyValues: unknown;
5862
5867
  response: Response;
5863
5868
  }) => Promise<{
5869
+ model: string;
5864
5870
  message: {
5865
5871
  role: string;
5866
5872
  content: string;
5867
5873
  };
5868
- model: string;
5869
5874
  done: true;
5870
5875
  created_at: string;
5871
5876
  total_duration: number;
@@ -5885,11 +5890,11 @@ declare const OllamaChatResponseFormat: {
5885
5890
  handler: ({ response }: {
5886
5891
  response: Response;
5887
5892
  }) => Promise<AsyncIterable<Delta<{
5893
+ model: string;
5888
5894
  message: {
5889
5895
  role: string;
5890
5896
  content: string;
5891
5897
  };
5892
- model: string;
5893
5898
  done: false;
5894
5899
  created_at: string;
5895
5900
  } | {
@@ -7424,12 +7429,12 @@ declare abstract class AbstractOpenAITextEmbeddingModel<SETTINGS extends Abstrac
7424
7429
  doEmbedValues(texts: string[], callOptions: FunctionCallOptions): Promise<{
7425
7430
  rawResponse: {
7426
7431
  object: "list";
7432
+ model: string;
7427
7433
  data: {
7428
7434
  object: "embedding";
7429
7435
  embedding: number[];
7430
7436
  index: number;
7431
7437
  }[];
7432
- model: string;
7433
7438
  usage?: {
7434
7439
  prompt_tokens: number;
7435
7440
  total_tokens: number;
@@ -7438,7 +7443,7 @@ declare abstract class AbstractOpenAITextEmbeddingModel<SETTINGS extends Abstrac
7438
7443
  embeddings: number[][];
7439
7444
  }>;
7440
7445
  }
7441
- declare const openAITextEmbeddingResponseSchema: z.ZodObject<{
7446
+ declare const openAITextEmbeddingResponseSchema$1: z.ZodObject<{
7442
7447
  object: z.ZodLiteral<"list">;
7443
7448
  data: z.ZodArray<z.ZodObject<{
7444
7449
  object: z.ZodLiteral<"embedding">;
@@ -7466,30 +7471,30 @@ declare const openAITextEmbeddingResponseSchema: z.ZodObject<{
7466
7471
  }>>;
7467
7472
  }, "strip", z.ZodTypeAny, {
7468
7473
  object: "list";
7474
+ model: string;
7469
7475
  data: {
7470
7476
  object: "embedding";
7471
7477
  embedding: number[];
7472
7478
  index: number;
7473
7479
  }[];
7474
- model: string;
7475
7480
  usage?: {
7476
7481
  prompt_tokens: number;
7477
7482
  total_tokens: number;
7478
7483
  } | undefined;
7479
7484
  }, {
7480
7485
  object: "list";
7486
+ model: string;
7481
7487
  data: {
7482
7488
  object: "embedding";
7483
7489
  embedding: number[];
7484
7490
  index: number;
7485
7491
  }[];
7486
- model: string;
7487
7492
  usage?: {
7488
7493
  prompt_tokens: number;
7489
7494
  total_tokens: number;
7490
7495
  } | undefined;
7491
7496
  }>;
7492
- type OpenAITextEmbeddingResponse = z.infer<typeof openAITextEmbeddingResponseSchema>;
7497
+ type OpenAITextEmbeddingResponse = z.infer<typeof openAITextEmbeddingResponseSchema$1>;
7493
7498
 
7494
7499
  type AzureOpenAIApiConfigurationOptions = {
7495
7500
  resourceName: string;
@@ -7728,21 +7733,12 @@ OpenAIChatSettings> {
7728
7733
  declare const OPENAI_TEXT_GENERATION_MODELS: {
7729
7734
  "gpt-3.5-turbo-instruct": {
7730
7735
  contextWindowSize: number;
7731
- promptTokenCostInMillicents: number;
7732
- completionTokenCostInMillicents: number;
7733
7736
  };
7734
7737
  };
7735
7738
  declare function getOpenAICompletionModelInformation(model: OpenAICompletionModelType): {
7736
7739
  contextWindowSize: number;
7737
- promptTokenCostInMillicents: number;
7738
- completionTokenCostInMillicents: number;
7739
7740
  };
7740
7741
  type OpenAICompletionModelType = keyof typeof OPENAI_TEXT_GENERATION_MODELS;
7741
- declare const isOpenAICompletionModel: (model: string) => model is "gpt-3.5-turbo-instruct";
7742
- declare const calculateOpenAICompletionCostInMillicents: ({ model, response, }: {
7743
- model: OpenAICompletionModelType;
7744
- response: OpenAICompletionResponse;
7745
- }) => number;
7746
7742
  interface OpenAICompletionModelSettings extends AbstractOpenAICompletionModelSettings {
7747
7743
  model: OpenAICompletionModelType;
7748
7744
  }
@@ -7786,28 +7782,71 @@ declare const OPENAI_TEXT_EMBEDDING_MODELS: {
7786
7782
  "text-embedding-3-small": {
7787
7783
  contextWindowSize: number;
7788
7784
  dimensions: number;
7789
- tokenCostInMillicents: number;
7790
7785
  };
7791
7786
  "text-embedding-3-large": {
7792
7787
  contextWindowSize: number;
7793
7788
  dimensions: number;
7794
- tokenCostInMillicents: number;
7795
7789
  };
7796
7790
  "text-embedding-ada-002": {
7797
7791
  contextWindowSize: number;
7798
7792
  dimensions: number;
7799
- tokenCostInMillicents: number;
7800
7793
  };
7801
7794
  };
7802
7795
  type OpenAITextEmbeddingModelType = keyof typeof OPENAI_TEXT_EMBEDDING_MODELS;
7803
- declare const isOpenAIEmbeddingModel: (model: string) => model is "text-embedding-3-small" | "text-embedding-3-large" | "text-embedding-ada-002";
7804
- declare const calculateOpenAIEmbeddingCostInMillicents: ({ model, responses, }: {
7805
- model: OpenAITextEmbeddingModelType;
7806
- responses: OpenAITextEmbeddingResponse[];
7807
- }) => number;
7808
7796
  interface OpenAITextEmbeddingModelSettings extends AbstractOpenAITextEmbeddingModelSettings {
7809
7797
  model: OpenAITextEmbeddingModelType;
7810
7798
  }
7799
+ declare const openAITextEmbeddingResponseSchema: z$1.ZodObject<{
7800
+ object: z$1.ZodLiteral<"list">;
7801
+ data: z$1.ZodArray<z$1.ZodObject<{
7802
+ object: z$1.ZodLiteral<"embedding">;
7803
+ embedding: z$1.ZodArray<z$1.ZodNumber, "many">;
7804
+ index: z$1.ZodNumber;
7805
+ }, "strip", z$1.ZodTypeAny, {
7806
+ object: "embedding";
7807
+ embedding: number[];
7808
+ index: number;
7809
+ }, {
7810
+ object: "embedding";
7811
+ embedding: number[];
7812
+ index: number;
7813
+ }>, "many">;
7814
+ model: z$1.ZodString;
7815
+ usage: z$1.ZodOptional<z$1.ZodObject<{
7816
+ prompt_tokens: z$1.ZodNumber;
7817
+ total_tokens: z$1.ZodNumber;
7818
+ }, "strip", z$1.ZodTypeAny, {
7819
+ prompt_tokens: number;
7820
+ total_tokens: number;
7821
+ }, {
7822
+ prompt_tokens: number;
7823
+ total_tokens: number;
7824
+ }>>;
7825
+ }, "strip", z$1.ZodTypeAny, {
7826
+ object: "list";
7827
+ model: string;
7828
+ data: {
7829
+ object: "embedding";
7830
+ embedding: number[];
7831
+ index: number;
7832
+ }[];
7833
+ usage?: {
7834
+ prompt_tokens: number;
7835
+ total_tokens: number;
7836
+ } | undefined;
7837
+ }, {
7838
+ object: "list";
7839
+ model: string;
7840
+ data: {
7841
+ object: "embedding";
7842
+ embedding: number[];
7843
+ index: number;
7844
+ }[];
7845
+ usage?: {
7846
+ prompt_tokens: number;
7847
+ total_tokens: number;
7848
+ } | undefined;
7849
+ }>;
7811
7850
  /**
7812
7851
  * Create a text embedding model that calls the OpenAI embedding API.
7813
7852
  *
@@ -7866,115 +7905,34 @@ declare class TikTokenTokenizer implements FullTokenizer {
7866
7905
  detokenize(tokens: number[]): Promise<string>;
7867
7906
  }
7868
7907
 
7869
- declare const OPENAI_CHAT_MODELS: {
7870
- "gpt-4": {
7871
- contextWindowSize: number;
7872
- promptTokenCostInMillicents: number;
7873
- completionTokenCostInMillicents: number;
7874
- };
7875
- "gpt-4-0314": {
7876
- contextWindowSize: number;
7877
- promptTokenCostInMillicents: number;
7878
- completionTokenCostInMillicents: number;
7879
- };
7880
- "gpt-4-0613": {
7881
- contextWindowSize: number;
7882
- promptTokenCostInMillicents: number;
7883
- completionTokenCostInMillicents: number;
7884
- fineTunedPromptTokenCostInMillicents: null;
7885
- fineTunedCompletionTokenCostInMillicents: null;
7886
- };
7887
- "gpt-4-turbo-preview": {
7888
- contextWindowSize: number;
7889
- promptTokenCostInMillicents: number;
7890
- completionTokenCostInMillicents: number;
7891
- };
7892
- "gpt-4-1106-preview": {
7893
- contextWindowSize: number;
7894
- promptTokenCostInMillicents: number;
7895
- completionTokenCostInMillicents: number;
7896
- };
7897
- "gpt-4-0125-preview": {
7898
- contextWindowSize: number;
7899
- promptTokenCostInMillicents: number;
7900
- completionTokenCostInMillicents: number;
7901
- };
7902
- "gpt-4-vision-preview": {
7903
- contextWindowSize: number;
7904
- promptTokenCostInMillicents: number;
7905
- completionTokenCostInMillicents: number;
7906
- };
7907
- "gpt-4-32k": {
7908
- contextWindowSize: number;
7909
- promptTokenCostInMillicents: number;
7910
- completionTokenCostInMillicents: number;
7911
- };
7912
- "gpt-4-32k-0314": {
7913
- contextWindowSize: number;
7914
- promptTokenCostInMillicents: number;
7915
- completionTokenCostInMillicents: number;
7916
- };
7917
- "gpt-4-32k-0613": {
7918
- contextWindowSize: number;
7919
- promptTokenCostInMillicents: number;
7920
- completionTokenCostInMillicents: number;
7921
- };
7922
- "gpt-3.5-turbo": {
7923
- contextWindowSize: number;
7924
- promptTokenCostInMillicents: number;
7925
- completionTokenCostInMillicents: number;
7926
- fineTunedPromptTokenCostInMillicents: number;
7927
- fineTunedCompletionTokenCostInMillicents: number;
7928
- };
7929
- "gpt-3.5-turbo-0125": {
7930
- contextWindowSize: number;
7931
- promptTokenCostInMillicents: number;
7932
- completionTokenCostInMillicents: number;
7933
- };
7934
- "gpt-3.5-turbo-1106": {
7935
- contextWindowSize: number;
7936
- promptTokenCostInMillicents: number;
7937
- completionTokenCostInMillicents: number;
7938
- };
7939
- "gpt-3.5-turbo-0301": {
7940
- contextWindowSize: number;
7941
- promptTokenCostInMillicents: number;
7942
- completionTokenCostInMillicents: number;
7943
- };
7944
- "gpt-3.5-turbo-0613": {
7945
- contextWindowSize: number;
7946
- promptTokenCostInMillicents: number;
7947
- completionTokenCostInMillicents: number;
7948
- fineTunedPromptTokenCostInMillicents: number;
7949
- fineTunedCompletionTokenCostInMillicents: number;
7950
- };
7951
- "gpt-3.5-turbo-16k": {
7952
- contextWindowSize: number;
7953
- promptTokenCostInMillicents: number;
7954
- completionTokenCostInMillicents: number;
7955
- };
7956
- "gpt-3.5-turbo-16k-0613": {
7957
- contextWindowSize: number;
7958
- promptTokenCostInMillicents: number;
7959
- completionTokenCostInMillicents: number;
7960
- };
7908
+ declare const CHAT_MODEL_CONTEXT_WINDOW_SIZES: {
7909
+ readonly "gpt-4": 8192;
7910
+ readonly "gpt-4-0314": 8192;
7911
+ readonly "gpt-4-0613": 8192;
7912
+ readonly "gpt-4-turbo-preview": 128000;
7913
+ readonly "gpt-4-1106-preview": 128000;
7914
+ readonly "gpt-4-0125-preview": 128000;
7915
+ readonly "gpt-4-vision-preview": 128000;
7916
+ readonly "gpt-4-32k": 32768;
7917
+ readonly "gpt-4-32k-0314": 32768;
7918
+ readonly "gpt-4-32k-0613": 32768;
7919
+ readonly "gpt-3.5-turbo": 4096;
7920
+ readonly "gpt-3.5-turbo-0125": 16385;
7921
+ readonly "gpt-3.5-turbo-1106": 16385;
7922
+ readonly "gpt-3.5-turbo-0301": 4096;
7923
+ readonly "gpt-3.5-turbo-0613": 4096;
7924
+ readonly "gpt-3.5-turbo-16k": 16384;
7925
+ readonly "gpt-3.5-turbo-16k-0613": 16384;
7961
7926
  };
7962
7927
  declare function getOpenAIChatModelInformation(model: OpenAIChatModelType): {
7963
7928
  baseModel: OpenAIChatBaseModelType;
7964
7929
  isFineTuned: boolean;
7965
7930
  contextWindowSize: number;
7966
- promptTokenCostInMillicents: number | null;
7967
- completionTokenCostInMillicents: number | null;
7968
7931
  };
7969
7932
  type FineTuneableOpenAIChatModelType = `gpt-3.5-turbo` | `gpt-3.5-turbo-0613` | `gpt-4-0613`;
7970
7933
  type FineTunedOpenAIChatModelType = `ft:${FineTuneableOpenAIChatModelType}:${string}:${string}:${string}`;
7971
- type OpenAIChatBaseModelType = keyof typeof OPENAI_CHAT_MODELS;
7934
+ type OpenAIChatBaseModelType = keyof typeof CHAT_MODEL_CONTEXT_WINDOW_SIZES;
7972
7935
  type OpenAIChatModelType = OpenAIChatBaseModelType | FineTunedOpenAIChatModelType;
7973
- declare const isOpenAIChatModel: (model: string) => model is OpenAIChatModelType;
7974
- declare const calculateOpenAIChatCostInMillicents: ({ model, response, }: {
7975
- model: OpenAIChatModelType;
7976
- response: OpenAIChatResponse;
7977
- }) => number | null;
7978
7936
  interface OpenAIChatSettings extends AbstractOpenAIChatSettings {
7979
7937
  model: OpenAIChatModelType;
7980
7938
  }
@@ -8056,24 +8014,8 @@ declare const openAIErrorDataSchema: z.ZodObject<{
8056
8014
  }>;
8057
8015
  type OpenAIErrorData = z.infer<typeof openAIErrorDataSchema>;
8058
8016
 
8059
- declare const OPENAI_IMAGE_MODELS: {
8060
- "dall-e-2": {
8061
- getCost(settings: OpenAIImageGenerationSettings): 2000 | 1800 | 1600 | null;
8062
- };
8063
- "dall-e-3": {
8064
- getCost(settings: OpenAIImageGenerationSettings): 4000 | 8000 | 12000 | null;
8065
- };
8066
- };
8067
- /**
8068
- * @see https://openai.com/pricing
8069
- */
8070
- declare const calculateOpenAIImageGenerationCostInMillicents: ({ model, settings, }: {
8071
- model: OpenAIImageModelType;
8072
- settings: OpenAIImageGenerationSettings;
8073
- }) => number | null;
8074
- type OpenAIImageModelType = keyof typeof OPENAI_IMAGE_MODELS;
8075
8017
  interface OpenAIImageGenerationCallSettings {
8076
- model: OpenAIImageModelType;
8018
+ model: "dall-e-2" | "dall-e-3";
8077
8019
  size?: "256x256" | "512x512" | "1024x1024" | "1792x1024" | "1024x1792";
8078
8020
  quality?: "standard" | "hd";
8079
8021
  style?: "vivid" | "natural";
@@ -8180,24 +8122,9 @@ declare const OpenAIImageGenerationResponseFormat: {
8180
8122
  };
8181
8123
  };
8182
8124
 
8183
- /**
8184
- * @see https://openai.com/pricing
8185
- */
8186
- declare const OPENAI_SPEECH_MODELS: {
8187
- "tts-1": {
8188
- costInMillicentsPerCharacter: number;
8189
- };
8190
- "tts-1-hd": {
8191
- costInMillicentsPerCharacter: number;
8192
- };
8193
- };
8194
- type OpenAISpeechModelType = keyof typeof OPENAI_SPEECH_MODELS;
8195
- declare const calculateOpenAISpeechCostInMillicents: ({ model, input, }: {
8196
- model: OpenAISpeechModelType;
8197
- input: string;
8198
- }) => number | null;
8199
8125
  type OpenAISpeechVoice = "alloy" | "echo" | "fable" | "onyx" | "nova" | "shimmer";
8200
8126
  type OpenAISpeechModelResponseFormat = "mp3" | "opus" | "aac" | "flac";
8127
+ type OpenAISpeechModelType = "tts-1" | "tts-1-hd";
8201
8128
  interface OpenAISpeechModelSettings extends SpeechGenerationModelSettings {
8202
8129
  api?: ApiConfiguration;
8203
8130
  voice: OpenAISpeechVoice;
@@ -8220,26 +8147,14 @@ declare class OpenAISpeechModel extends AbstractModel<OpenAISpeechModelSettings>
8220
8147
  constructor(settings: OpenAISpeechModelSettings);
8221
8148
  readonly provider: "openai";
8222
8149
  get voice(): OpenAISpeechVoice;
8223
- get modelName(): "tts-1" | "tts-1-hd";
8150
+ get modelName(): OpenAISpeechModelType;
8224
8151
  private callAPI;
8225
8152
  get settingsForEvent(): Partial<OpenAISpeechModelSettings>;
8226
8153
  doGenerateSpeechStandard(text: string, options: FunctionCallOptions): Promise<Uint8Array>;
8227
8154
  withSettings(additionalSettings: Partial<OpenAISpeechModelSettings>): this;
8228
8155
  }
8229
8156
 
8230
- /**
8231
- * @see https://openai.com/pricing
8232
- */
8233
- declare const OPENAI_TRANSCRIPTION_MODELS: {
8234
- "whisper-1": {
8235
- costInMillicentsPerSecond: number;
8236
- };
8237
- };
8238
- type OpenAITranscriptionModelType = keyof typeof OPENAI_TRANSCRIPTION_MODELS;
8239
- declare const calculateOpenAITranscriptionCostInMillicents: ({ model, response, }: {
8240
- model: OpenAITranscriptionModelType;
8241
- response: OpenAITranscriptionVerboseJsonResponse;
8242
- }) => number | null;
8157
+ type OpenAITranscriptionModelType = "whisper-1";
8243
8158
  interface OpenAITranscriptionModelSettings extends TranscriptionModelSettings {
8244
8159
  api?: ApiConfiguration;
8245
8160
  /**
@@ -8290,8 +8205,8 @@ declare class OpenAITranscriptionModel extends AbstractModel<OpenAITranscription
8290
8205
  rawResponse: {
8291
8206
  text: string;
8292
8207
  duration: number;
8293
- task: "transcribe";
8294
8208
  language: string;
8209
+ task: "transcribe";
8295
8210
  segments: {
8296
8211
  text: string;
8297
8212
  id: number;
@@ -8370,8 +8285,8 @@ declare const openAITranscriptionVerboseJsonSchema: z.ZodObject<{
8370
8285
  }, "strip", z.ZodTypeAny, {
8371
8286
  text: string;
8372
8287
  duration: number;
8373
- task: "transcribe";
8374
8288
  language: string;
8289
+ task: "transcribe";
8375
8290
  segments: {
8376
8291
  text: string;
8377
8292
  id: number;
@@ -8388,8 +8303,8 @@ declare const openAITranscriptionVerboseJsonSchema: z.ZodObject<{
8388
8303
  }, {
8389
8304
  text: string;
8390
8305
  duration: number;
8391
- task: "transcribe";
8392
8306
  language: string;
8307
+ task: "transcribe";
8393
8308
  segments: {
8394
8309
  text: string;
8395
8310
  id: number;
@@ -8421,8 +8336,8 @@ declare const OpenAITranscriptionResponseFormat: {
8421
8336
  handler: ResponseHandler<{
8422
8337
  text: string;
8423
8338
  duration: number;
8424
- task: "transcribe";
8425
8339
  language: string;
8340
+ task: "transcribe";
8426
8341
  segments: {
8427
8342
  text: string;
8428
8343
  id: number;
@@ -9544,4 +9459,4 @@ declare function upsertIntoVectorIndex<VALUE, OBJECT>({ vectorIndex, embeddingMo
9544
9459
  getId?: (object: OBJECT, index: number) => string | undefined;
9545
9460
  }, options?: FunctionOptions): Promise<void>;
9546
9461
 
9547
- export { AbortError, AbstractOpenAIChatModel, type AbstractOpenAIChatSettings, AbstractOpenAICompletionModel, type AbstractOpenAICompletionModelSettings, AbstractOpenAITextEmbeddingModel, type AbstractOpenAITextEmbeddingModelSettings, AlpacaPromptTemplate as AlpacaPrompt, ApiCallError, type ApiConfiguration, type AssistantContent, AsyncQueue, type AudioMimeType, Automatic1111ApiConfiguration, type Automatic1111ErrorData, Automatic1111ImageGenerationModel, type Automatic1111ImageGenerationPrompt, type Automatic1111ImageGenerationResponse, type Automatic1111ImageGenerationSettings, AzureOpenAIApiConfiguration, type AzureOpenAIApiConfigurationOptions, type BaseFunctionEvent, type BaseFunctionFinishedEvent, type BaseFunctionFinishedEventResult, type BaseFunctionStartedEvent, type BaseModelCallFinishedEvent, type BaseModelCallFinishedEventResult, type BaseModelCallStartedEvent, BaseUrlApiConfiguration, BaseUrlApiConfigurationWithDefaults, type BaseUrlPartsApiConfigurationOptions, type BasicTokenizer, COHERE_TEXT_EMBEDDING_MODELS, COHERE_TEXT_GENERATION_MODELS, type Cache, ChatMLPromptTemplate as ChatMLPrompt, ChatMessage, type ChatPrompt, type Classifier, type ClassifierSettings, type ClassifyFinishedEvent, type ClassifyFinishedEventResult, type ClassifyStartedEvent, CohereApiConfiguration, type CohereDetokenizationResponse, type CohereErrorData, CohereTextEmbeddingModel, type CohereTextEmbeddingModelSettings, type CohereTextEmbeddingModelType, type CohereTextEmbeddingResponse, CohereTextGenerationModel, type CohereTextGenerationModelSettings, type CohereTextGenerationModelType, type CohereTextGenerationResponse, CohereTextGenerationResponseFormat, type CohereTextGenerationResponseFormatType, type CohereTextStreamChunk, type CohereTokenizationResponse, CohereTokenizer, type CohereTokenizerModelType, type CohereTokenizerSettings, type CustomHeaderProvider, type DataContent, DefaultRun, type Delta, ElevenLabsApiConfiguration, ElevenLabsSpeechModel, type ElevenLabsSpeechModelSettings, type EmbeddingFinishedEvent, type EmbeddingFinishedEventResult, type EmbeddingModel, type EmbeddingModelSettings, EmbeddingSimilarityClassifier, type EmbeddingSimilarityClassifierSettings, type EmbeddingStartedEvent, type ExecuteFunctionFinishedEvent, type ExecuteFunctionStartedEvent, type ExecuteToolFinishedEvent, type ExecuteToolMetadata, type ExecuteToolStartedEvent, FireworksAIApiConfiguration, type FlexibleObjectFromTextPromptTemplate, type FullTokenizer, type FunctionCallOptions, type FunctionEvent, FunctionEventSource, type FunctionObserver, type FunctionOptions, type HasContextWindowSize, type HasTokenizer, type HeaderParameters, HeliconeOpenAIApiConfiguration, HuggingFaceApiConfiguration, type HuggingFaceErrorData, HuggingFaceTextEmbeddingModel, type HuggingFaceTextEmbeddingModelSettings, type HuggingFaceTextEmbeddingResponse, HuggingFaceTextGenerationModel, type HuggingFaceTextGenerationModelSettings, type HuggingFaceTextGenerationResponse, type ImageGenerationFinishedEvent, type ImageGenerationFinishedEventResult, type ImageGenerationModel, type ImageGenerationModelSettings, type ImageGenerationStartedEvent, type ImagePart, type InstructionContent, type InstructionPrompt, InvalidPromptError, JSONParseError, type JsonSchemaProducer, Llama2PromptTemplate as Llama2Prompt, LlamaCppApiConfiguration, LlamaCppCompletionModel, type LlamaCppCompletionModelSettings, type LlamaCppCompletionPrompt, LlamaCppCompletionResponseFormat, type LlamaCppCompletionResponseFormatType, type LlamaCppErrorData, LlamaCppTextEmbeddingModel, type LlamaCppTextEmbeddingModelSettings, type LlamaCppTextEmbeddingResponse, type LlamaCppTextGenerationResponse, type LlamaCppTextStreamChunk, type LlamaCppTokenizationResponse, LlamaCppTokenizer, LmntApiConfiguration, LmntSpeechModel, type LmntSpeechModelSettings, type LmntSpeechResponse, type LogFormat, MemoryCache, MemoryVectorIndex, MistralApiConfiguration, type MistralChatMessage, MistralChatModel, type MistralChatModelSettings, type MistralChatPrompt, type MistralChatResponse, MistralChatResponseFormat, type MistralChatResponseFormatType, type MistralChatStreamChunk, type MistralErrorData, MistralInstructPromptTemplate as MistralInstructPrompt, MistralTextEmbeddingModel, type MistralTextEmbeddingModelSettings, type MistralTextEmbeddingResponse, type Model, type ModelCallFinishedEvent, type ModelCallMetadata, type ModelCallStartedEvent, type ModelInformation, type ModelSettings, NeuralChatPromptTemplate as NeuralChatPrompt, NoSuchToolDefinitionError, OPENAI_CHAT_MESSAGE_BASE_TOKEN_COUNT, OPENAI_CHAT_MODELS, OPENAI_CHAT_PROMPT_BASE_TOKEN_COUNT, OPENAI_IMAGE_MODELS, OPENAI_SPEECH_MODELS, OPENAI_TEXT_EMBEDDING_MODELS, OPENAI_TEXT_GENERATION_MODELS, OPENAI_TRANSCRIPTION_MODELS, ObjectFromTextGenerationModel, type ObjectFromTextPromptTemplate, ObjectFromTextStreamingModel, type ObjectGenerationFinishedEvent, type ObjectGenerationFinishedEventResult, type ObjectGenerationModel, type ObjectGenerationModelSettings, type ObjectGenerationStartedEvent, ObjectGeneratorTool, ObjectParseError, type ObjectStream, ObjectStreamFromResponse, ObjectStreamResponse, type ObjectStreamingFinishedEvent, type ObjectStreamingModel, type ObjectStreamingStartedEvent, ObjectValidationError, OllamaApiConfiguration, type OllamaChatMessage, OllamaChatModel, type OllamaChatModelSettings, type OllamaChatPrompt, type OllamaChatResponse, OllamaChatResponseFormat, type OllamaChatResponseFormatType, type OllamaChatStreamChunk, OllamaCompletionModel, type OllamaCompletionModelSettings, type OllamaCompletionPrompt$1 as OllamaCompletionPrompt, type OllamaCompletionResponse, OllamaCompletionResponseFormat, type OllamaCompletionResponseFormatType, type OllamaCompletionStreamChunk, type OllamaErrorData, OllamaTextEmbeddingModel, type OllamaTextEmbeddingModelSettings, type OllamaTextEmbeddingResponse, type OllamaTextGenerationSettings, OpenAIApiConfiguration, type OpenAIChatBaseModelType, type OpenAIChatChunk, OpenAIChatMessage, OpenAIChatModel, type OpenAIChatModelType, type OpenAIChatPrompt, type OpenAIChatResponse, OpenAIChatResponseFormat, type OpenAIChatResponseFormatType, type OpenAIChatSettings, type OpenAICompatibleApiConfiguration, OpenAICompatibleChatModel, type OpenAICompatibleChatSettings, OpenAICompatibleCompletionModel, type OpenAICompatibleCompletionModelSettings, type OpenAICompatibleProviderName, OpenAICompatibleTextEmbeddingModel, type OpenAICompatibleTextEmbeddingModelSettings, OpenAICompletionModel, type OpenAICompletionModelSettings, type OpenAICompletionModelType, type OpenAICompletionResponse, type OpenAIErrorData, type OpenAIImageGenerationBase64JsonResponse, type OpenAIImageGenerationCallSettings, OpenAIImageGenerationModel, OpenAIImageGenerationResponseFormat, type OpenAIImageGenerationResponseFormatType, type OpenAIImageGenerationSettings, type OpenAIImageGenerationUrlResponse, type OpenAIImageModelType, OpenAISpeechModel, type OpenAISpeechModelSettings, type OpenAISpeechModelType, type OpenAISpeechVoice, OpenAITextEmbeddingModel, type OpenAITextEmbeddingModelSettings, type OpenAITextEmbeddingModelType, type OpenAITextEmbeddingResponse, OpenAITextResponseFormat, type OpenAITextResponseFormatType, type OpenAITranscriptionJsonResponse, OpenAITranscriptionModel, type OpenAITranscriptionModelSettings, type OpenAITranscriptionModelType, OpenAITranscriptionResponseFormat, type OpenAITranscriptionResponseFormatType, type OpenAITranscriptionVerboseJsonResponse, type PartialBaseUrlPartsApiConfigurationOptions, PerplexityApiConfiguration, type PromptFunction, type PromptTemplate, PromptTemplateFullTextModel, PromptTemplateImageGenerationModel, PromptTemplateTextGenerationModel, PromptTemplateTextStreamingModel, type Retriever, RetryError, type RetryErrorReason, type RetryFunction, type Run, type Schema, type SpeechGenerationFinishedEvent, type SpeechGenerationFinishedEventResult, type SpeechGenerationModel, type SpeechGenerationModelSettings, type SpeechGenerationStartedEvent, type SpeechStreamingFinishedEvent, type SpeechStreamingStartedEvent, type SplitFunction, StabilityApiConfiguration, type StabilityClipGuidancePreset, type StabilityErrorData, StabilityImageGenerationModel, type StabilityImageGenerationModelType, type StabilityImageGenerationPrompt, type StabilityImageGenerationResponse, type StabilityImageGenerationSampler, type StabilityImageGenerationSettings, type StabilityImageGenerationStylePreset, type StreamingSpeechGenerationModel, SynthiaPromptTemplate as SynthiaPrompt, type TextChunk, type TextGenerationBaseModel, type TextGenerationFinishReason, type TextGenerationFinishedEvent, type TextGenerationFinishedEventResult, type TextGenerationModel, type TextGenerationModelSettings, type TextGenerationPromptTemplate, type TextGenerationPromptTemplateProvider, type TextGenerationResult, type TextGenerationStartedEvent, TextGenerationToolCallModel, TextGenerationToolCallsModel, type TextPart, TextPromptTemplate as TextPrompt, type TextStreamingBaseModel, type TextStreamingFinishedEvent, type TextStreamingModel, type TextStreamingStartedEvent, type ThrottleFunction, TikTokenTokenizer, type TikTokenTokenizerSettings, TogetherAIApiConfiguration, Tool, type ToolCall, ToolCallArgumentsValidationError, ToolCallError, ToolCallGenerationError, type ToolCallGenerationFinishedEvent, type ToolCallGenerationFinishedEventResult, type ToolCallGenerationModel, type ToolCallGenerationModelSettings, type ToolCallGenerationStartedEvent, ToolCallParseError, type ToolCallPart, type ToolCallPromptTemplate, type ToolCallResult, type ToolCallsGenerationFinishedEvent, type ToolCallsGenerationFinishedEventResult, type ToolCallsGenerationModel, type ToolCallsGenerationModelSettings, type ToolCallsGenerationStartedEvent, ToolCallsParseError, type ToolCallsPromptTemplate, type ToolContent, type ToolDefinition, ToolExecutionError, type ToolResponsePart, type TranscriptionFinishedEvent, type TranscriptionFinishedEventResult, type TranscriptionModel, type TranscriptionModelSettings, type TranscriptionStartedEvent, TypeValidationError, UncheckedSchema, type UpsertIntoVectorIndexFinishedEvent, type UpsertIntoVectorIndexStartedEvent, type UrlParts, type UserContent, type ValueCluster, type Vector, type VectorIndex, VectorIndexRetriever, type VectorIndexRetrieverSettings, VicunaPromptTemplate as VicunaPrompt, WebSearchTool, type WebSearchToolInput, type WebSearchToolOutput, WhisperCppApiConfiguration, WhisperCppTranscriptionModel, type WhisperCppTranscriptionModelSettings, ZodSchema, ApiFacade as api, Automatic1111Facade as automatic1111, calculateOpenAIChatCostInMillicents, calculateOpenAICompletionCostInMillicents, calculateOpenAIEmbeddingCostInMillicents, calculateOpenAIImageGenerationCostInMillicents, calculateOpenAISpeechCostInMillicents, calculateOpenAITranscriptionCostInMillicents, classify, CohereFacade as cohere, convertDataContentToBase64String, convertDataContentToUint8Array, cosineSimilarity, countOpenAIChatMessageTokens, countOpenAIChatPromptTokens, countTokens, createChatPrompt, createEventSourceStream, createInstructionPrompt, createTextPrompt, delay, ElevenLabsFacade as elevenlabs, embed, embedMany, executeFunction, executeTool, generateImage, generateObject, generateSpeech, generateText, generateToolCall, generateToolCalls, generateTranscription, getAudioFileExtension, getOpenAIChatModelInformation, getOpenAICompletionModelInformation, getRun, HuggingFaceFacade as huggingface, isOpenAIChatModel, isOpenAICompletionModel, isOpenAIEmbeddingModel, isPromptFunction, jsonObjectPrompt, jsonToolCallPrompt, LlamaCppFacade as llamacpp, LmntFacade as lmnt, mapBasicPromptToAutomatic1111Format, mapBasicPromptToStabilityFormat, markAsPromptFunction, MistralFacade as mistral, ModelFusionConfiguration as modelfusion, OllamaFacade as ollama, OpenAIFacade as openai, OpenAICompatibleFacade as openaicompatible, parseJSON, retrieve, retryNever, retryWithExponentialBackoff, runTool, type runToolFinishedEvent, type runToolStartedEvent, runTools, type runToolsFinishedEvent, type runToolsStartedEvent, safeParseJSON, safeValidateTypes, splitAtCharacter, splitAtToken, splitOnSeparator, splitTextChunk, splitTextChunks, StabilityFacade as stability, streamObject, streamSpeech, streamText, textGenerationModelProperties, throttleMaxConcurrency, throttleOff, trimChatPrompt, uncheckedSchema, upsertIntoVectorIndex, validateContentIsString, validateTypes, WhisperCppFacade as whispercpp, withRun, zodSchema };
9462
+ export { AbortError, AbstractOpenAIChatModel, type AbstractOpenAIChatSettings, AbstractOpenAICompletionModel, type AbstractOpenAICompletionModelSettings, AbstractOpenAITextEmbeddingModel, type AbstractOpenAITextEmbeddingModelSettings, AlpacaPromptTemplate as AlpacaPrompt, ApiCallError, type ApiConfiguration, type AssistantContent, AsyncQueue, type AudioMimeType, Automatic1111ApiConfiguration, type Automatic1111ErrorData, Automatic1111ImageGenerationModel, type Automatic1111ImageGenerationPrompt, type Automatic1111ImageGenerationResponse, type Automatic1111ImageGenerationSettings, AzureOpenAIApiConfiguration, type AzureOpenAIApiConfigurationOptions, type BaseFunctionEvent, type BaseFunctionFinishedEvent, type BaseFunctionFinishedEventResult, type BaseFunctionStartedEvent, type BaseModelCallFinishedEvent, type BaseModelCallFinishedEventResult, type BaseModelCallStartedEvent, BaseUrlApiConfiguration, BaseUrlApiConfigurationWithDefaults, type BaseUrlPartsApiConfigurationOptions, type BasicTokenizer, CHAT_MODEL_CONTEXT_WINDOW_SIZES, COHERE_TEXT_EMBEDDING_MODELS, COHERE_TEXT_GENERATION_MODELS, type Cache, ChatMLPromptTemplate as ChatMLPrompt, ChatMessage, type ChatPrompt, type Classifier, type ClassifierSettings, type ClassifyFinishedEvent, type ClassifyFinishedEventResult, type ClassifyStartedEvent, CohereApiConfiguration, type CohereDetokenizationResponse, type CohereErrorData, CohereTextEmbeddingModel, type CohereTextEmbeddingModelSettings, type CohereTextEmbeddingModelType, type CohereTextEmbeddingResponse, CohereTextGenerationModel, type CohereTextGenerationModelSettings, type CohereTextGenerationModelType, type CohereTextGenerationResponse, CohereTextGenerationResponseFormat, type CohereTextGenerationResponseFormatType, type CohereTextStreamChunk, type CohereTokenizationResponse, CohereTokenizer, type CohereTokenizerModelType, type CohereTokenizerSettings, type CustomHeaderProvider, type DataContent, DefaultRun, type Delta, ElevenLabsApiConfiguration, ElevenLabsSpeechModel, type ElevenLabsSpeechModelSettings, type EmbeddingFinishedEvent, type EmbeddingFinishedEventResult, type EmbeddingModel, type EmbeddingModelSettings, EmbeddingSimilarityClassifier, type EmbeddingSimilarityClassifierSettings, type EmbeddingStartedEvent, type ExecuteFunctionFinishedEvent, type ExecuteFunctionStartedEvent, type ExecuteToolFinishedEvent, type ExecuteToolMetadata, type ExecuteToolStartedEvent, FireworksAIApiConfiguration, type FlexibleObjectFromTextPromptTemplate, type FullTokenizer, type FunctionCallOptions, type FunctionEvent, FunctionEventSource, type FunctionObserver, type FunctionOptions, type HasContextWindowSize, type HasTokenizer, type HeaderParameters, HeliconeOpenAIApiConfiguration, HuggingFaceApiConfiguration, type HuggingFaceErrorData, HuggingFaceTextEmbeddingModel, type HuggingFaceTextEmbeddingModelSettings, type HuggingFaceTextEmbeddingResponse, HuggingFaceTextGenerationModel, type HuggingFaceTextGenerationModelSettings, type HuggingFaceTextGenerationResponse, type ImageGenerationFinishedEvent, type ImageGenerationFinishedEventResult, type ImageGenerationModel, type ImageGenerationModelSettings, type ImageGenerationStartedEvent, type ImagePart, type InstructionContent, type InstructionPrompt, InvalidPromptError, JSONParseError, type JsonSchemaProducer, Llama2PromptTemplate as Llama2Prompt, LlamaCppApiConfiguration, LlamaCppCompletionModel, type LlamaCppCompletionModelSettings, type LlamaCppCompletionPrompt, LlamaCppCompletionResponseFormat, type LlamaCppCompletionResponseFormatType, type LlamaCppErrorData, LlamaCppTextEmbeddingModel, type LlamaCppTextEmbeddingModelSettings, type LlamaCppTextEmbeddingResponse, type LlamaCppTextGenerationResponse, type LlamaCppTextStreamChunk, type LlamaCppTokenizationResponse, LlamaCppTokenizer, LmntApiConfiguration, LmntSpeechModel, type LmntSpeechModelSettings, type LmntSpeechResponse, type LogFormat, MemoryCache, MemoryVectorIndex, MistralApiConfiguration, type MistralChatMessage, MistralChatModel, type MistralChatModelSettings, type MistralChatPrompt, type MistralChatResponse, MistralChatResponseFormat, type MistralChatResponseFormatType, type MistralChatStreamChunk, type MistralErrorData, MistralInstructPromptTemplate as MistralInstructPrompt, MistralTextEmbeddingModel, type MistralTextEmbeddingModelSettings, type MistralTextEmbeddingResponse, type Model, type ModelCallFinishedEvent, type ModelCallMetadata, type ModelCallStartedEvent, type ModelInformation, type ModelSettings, NeuralChatPromptTemplate as NeuralChatPrompt, NoSuchToolDefinitionError, OPENAI_CHAT_MESSAGE_BASE_TOKEN_COUNT, OPENAI_CHAT_PROMPT_BASE_TOKEN_COUNT, OPENAI_TEXT_EMBEDDING_MODELS, OPENAI_TEXT_GENERATION_MODELS, ObjectFromTextGenerationModel, type ObjectFromTextPromptTemplate, ObjectFromTextStreamingModel, type ObjectGenerationFinishedEvent, type ObjectGenerationFinishedEventResult, type ObjectGenerationModel, type ObjectGenerationModelSettings, type ObjectGenerationStartedEvent, ObjectGeneratorTool, ObjectParseError, type ObjectStream, ObjectStreamFromResponse, ObjectStreamResponse, type ObjectStreamingFinishedEvent, type ObjectStreamingModel, type ObjectStreamingStartedEvent, ObjectValidationError, OllamaApiConfiguration, type OllamaChatMessage, OllamaChatModel, type OllamaChatModelSettings, type OllamaChatPrompt, type OllamaChatResponse, OllamaChatResponseFormat, type OllamaChatResponseFormatType, type OllamaChatStreamChunk, OllamaCompletionModel, type OllamaCompletionModelSettings, type OllamaCompletionPrompt$1 as OllamaCompletionPrompt, type OllamaCompletionResponse, OllamaCompletionResponseFormat, type OllamaCompletionResponseFormatType, type OllamaCompletionStreamChunk, type OllamaErrorData, OllamaTextEmbeddingModel, type OllamaTextEmbeddingModelSettings, type OllamaTextEmbeddingResponse, type OllamaTextGenerationSettings, OpenAIApiConfiguration, type OpenAIChatBaseModelType, type OpenAIChatChunk, OpenAIChatMessage, OpenAIChatModel, type OpenAIChatModelType, type OpenAIChatPrompt, type OpenAIChatResponse, OpenAIChatResponseFormat, type OpenAIChatResponseFormatType, type OpenAIChatSettings, type OpenAICompatibleApiConfiguration, OpenAICompatibleChatModel, type OpenAICompatibleChatSettings, OpenAICompatibleCompletionModel, type OpenAICompatibleCompletionModelSettings, type OpenAICompatibleProviderName, OpenAICompatibleTextEmbeddingModel, type OpenAICompatibleTextEmbeddingModelSettings, OpenAICompletionModel, type OpenAICompletionModelSettings, type OpenAICompletionModelType, type OpenAICompletionResponse, type OpenAIErrorData, type OpenAIImageGenerationBase64JsonResponse, type OpenAIImageGenerationCallSettings, OpenAIImageGenerationModel, OpenAIImageGenerationResponseFormat, type OpenAIImageGenerationResponseFormatType, type OpenAIImageGenerationSettings, type OpenAIImageGenerationUrlResponse, OpenAISpeechModel, type OpenAISpeechModelSettings, type OpenAISpeechModelType, type OpenAISpeechVoice, OpenAITextEmbeddingModel, type OpenAITextEmbeddingModelSettings, type OpenAITextEmbeddingModelType, type OpenAITextEmbeddingResponse, OpenAITextResponseFormat, type OpenAITextResponseFormatType, type OpenAITranscriptionJsonResponse, OpenAITranscriptionModel, type OpenAITranscriptionModelSettings, OpenAITranscriptionResponseFormat, type OpenAITranscriptionResponseFormatType, type OpenAITranscriptionVerboseJsonResponse, type PartialBaseUrlPartsApiConfigurationOptions, PerplexityApiConfiguration, type PromptFunction, type PromptTemplate, PromptTemplateFullTextModel, PromptTemplateImageGenerationModel, PromptTemplateTextGenerationModel, PromptTemplateTextStreamingModel, type Retriever, RetryError, type RetryErrorReason, type RetryFunction, type Run, type Schema, type SpeechGenerationFinishedEvent, type SpeechGenerationFinishedEventResult, type SpeechGenerationModel, type SpeechGenerationModelSettings, type SpeechGenerationStartedEvent, type SpeechStreamingFinishedEvent, type SpeechStreamingStartedEvent, type SplitFunction, StabilityApiConfiguration, type StabilityClipGuidancePreset, type StabilityErrorData, StabilityImageGenerationModel, type StabilityImageGenerationModelType, type StabilityImageGenerationPrompt, type StabilityImageGenerationResponse, type StabilityImageGenerationSampler, type StabilityImageGenerationSettings, type StabilityImageGenerationStylePreset, type StreamingSpeechGenerationModel, SynthiaPromptTemplate as SynthiaPrompt, type TextChunk, type TextGenerationBaseModel, type TextGenerationFinishReason, type TextGenerationFinishedEvent, type TextGenerationFinishedEventResult, type TextGenerationModel, type TextGenerationModelSettings, type TextGenerationPromptTemplate, type TextGenerationPromptTemplateProvider, type TextGenerationResult, type TextGenerationStartedEvent, TextGenerationToolCallModel, TextGenerationToolCallsModel, type TextPart, TextPromptTemplate as TextPrompt, type TextStreamingBaseModel, type TextStreamingFinishedEvent, type TextStreamingModel, type TextStreamingStartedEvent, type ThrottleFunction, TikTokenTokenizer, type TikTokenTokenizerSettings, TogetherAIApiConfiguration, Tool, type ToolCall, ToolCallArgumentsValidationError, ToolCallError, ToolCallGenerationError, type ToolCallGenerationFinishedEvent, type ToolCallGenerationFinishedEventResult, type ToolCallGenerationModel, type ToolCallGenerationModelSettings, type ToolCallGenerationStartedEvent, ToolCallParseError, type ToolCallPart, type ToolCallPromptTemplate, type ToolCallResult, type ToolCallsGenerationFinishedEvent, type ToolCallsGenerationFinishedEventResult, type ToolCallsGenerationModel, type ToolCallsGenerationModelSettings, type ToolCallsGenerationStartedEvent, ToolCallsParseError, type ToolCallsPromptTemplate, type ToolContent, type ToolDefinition, ToolExecutionError, type ToolResponsePart, type TranscriptionFinishedEvent, type TranscriptionFinishedEventResult, type TranscriptionModel, type TranscriptionModelSettings, type TranscriptionStartedEvent, TypeValidationError, UncheckedSchema, type UpsertIntoVectorIndexFinishedEvent, type UpsertIntoVectorIndexStartedEvent, type UrlParts, type UserContent, type ValueCluster, type Vector, type VectorIndex, VectorIndexRetriever, type VectorIndexRetrieverSettings, VicunaPromptTemplate as VicunaPrompt, WebSearchTool, type WebSearchToolInput, type WebSearchToolOutput, WhisperCppApiConfiguration, WhisperCppTranscriptionModel, type WhisperCppTranscriptionModelSettings, ZodSchema, ApiFacade as api, Automatic1111Facade as automatic1111, classify, CohereFacade as cohere, convertDataContentToBase64String, convertDataContentToUint8Array, cosineSimilarity, countOpenAIChatMessageTokens, countOpenAIChatPromptTokens, countTokens, createChatPrompt, createEventSourceStream, createInstructionPrompt, createTextPrompt, delay, ElevenLabsFacade as elevenlabs, embed, embedMany, executeFunction, executeTool, generateImage, generateObject, generateSpeech, generateText, generateToolCall, generateToolCalls, generateTranscription, getAudioFileExtension, getOpenAIChatModelInformation, getOpenAICompletionModelInformation, getRun, HuggingFaceFacade as huggingface, isPromptFunction, jsonObjectPrompt, jsonToolCallPrompt, LlamaCppFacade as llamacpp, LmntFacade as lmnt, mapBasicPromptToAutomatic1111Format, mapBasicPromptToStabilityFormat, markAsPromptFunction, MistralFacade as mistral, ModelFusionConfiguration as modelfusion, OllamaFacade as ollama, openAITextEmbeddingResponseSchema, OpenAIFacade as openai, OpenAICompatibleFacade as openaicompatible, parseJSON, retrieve, retryNever, retryWithExponentialBackoff, runTool, type runToolFinishedEvent, type runToolStartedEvent, runTools, type runToolsFinishedEvent, type runToolsStartedEvent, safeParseJSON, safeValidateTypes, splitAtCharacter, splitAtToken, splitOnSeparator, splitTextChunk, splitTextChunks, StabilityFacade as stability, streamObject, streamSpeech, streamText, textGenerationModelProperties, throttleMaxConcurrency, throttleOff, trimChatPrompt, uncheckedSchema, upsertIntoVectorIndex, validateContentIsString, validateTypes, WhisperCppFacade as whispercpp, withRun, zodSchema };