@reverbia/sdk 1.0.0-next.20251219154503 → 1.0.0-next.20251219170400
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/dist/expo/index.cjs +71 -8
- package/dist/expo/index.d.mts +34 -0
- package/dist/expo/index.d.ts +34 -0
- package/dist/expo/index.mjs +71 -8
- package/dist/index.cjs +12 -0
- package/dist/index.d.mts +243 -4
- package/dist/index.d.ts +243 -4
- package/dist/index.mjs +11 -0
- package/dist/react/index.cjs +73 -9
- package/dist/react/index.d.mts +34 -0
- package/dist/react/index.d.ts +34 -0
- package/dist/react/index.mjs +73 -9
- package/dist/vercel/index.d.mts +28 -0
- package/dist/vercel/index.d.ts +28 -0
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -319,6 +319,10 @@ type LlmapiMessage = {
|
|
|
319
319
|
*/
|
|
320
320
|
content?: Array<LlmapiMessageContentPart>;
|
|
321
321
|
role?: LlmapiRole;
|
|
322
|
+
/**
|
|
323
|
+
* ToolCalls contains tool/function calls made by the assistant (only for assistant role)
|
|
324
|
+
*/
|
|
325
|
+
tool_calls?: Array<LlmapiToolCall>;
|
|
322
326
|
};
|
|
323
327
|
/**
|
|
324
328
|
* ImageURL is used when Type=image_url
|
|
@@ -469,6 +473,162 @@ type LlmapiModelsListResponse = {
|
|
|
469
473
|
*/
|
|
470
474
|
next_page_token?: string;
|
|
471
475
|
};
|
|
476
|
+
/**
|
|
477
|
+
* ExtraFields contains additional metadata
|
|
478
|
+
*/
|
|
479
|
+
type LlmapiResponseExtraFields = {
|
|
480
|
+
/**
|
|
481
|
+
* Latency is the request latency in milliseconds
|
|
482
|
+
*/
|
|
483
|
+
latency?: number;
|
|
484
|
+
/**
|
|
485
|
+
* ModelRequested is the model that was requested
|
|
486
|
+
*/
|
|
487
|
+
model_requested?: string;
|
|
488
|
+
/**
|
|
489
|
+
* Provider is the LLM provider used (e.g., "openai", "anthropic")
|
|
490
|
+
*/
|
|
491
|
+
provider?: string;
|
|
492
|
+
/**
|
|
493
|
+
* RequestType is always "responses"
|
|
494
|
+
*/
|
|
495
|
+
request_type?: string;
|
|
496
|
+
};
|
|
497
|
+
type LlmapiResponseOutputContent = {
|
|
498
|
+
/**
|
|
499
|
+
* Text is the text content
|
|
500
|
+
*/
|
|
501
|
+
text?: string;
|
|
502
|
+
/**
|
|
503
|
+
* Type is the content type (e.g., "output_text")
|
|
504
|
+
*/
|
|
505
|
+
type?: string;
|
|
506
|
+
};
|
|
507
|
+
type LlmapiResponseOutputItem = {
|
|
508
|
+
/**
|
|
509
|
+
* Arguments is the function arguments for function_call types
|
|
510
|
+
*/
|
|
511
|
+
arguments?: string;
|
|
512
|
+
/**
|
|
513
|
+
* CallID is the call ID for function_call types
|
|
514
|
+
*/
|
|
515
|
+
call_id?: string;
|
|
516
|
+
/**
|
|
517
|
+
* Content is the content array for message types
|
|
518
|
+
*/
|
|
519
|
+
content?: Array<LlmapiResponseOutputContent>;
|
|
520
|
+
/**
|
|
521
|
+
* ID is the unique identifier for this output item
|
|
522
|
+
*/
|
|
523
|
+
id?: string;
|
|
524
|
+
/**
|
|
525
|
+
* Name is the function name for function_call types
|
|
526
|
+
*/
|
|
527
|
+
name?: string;
|
|
528
|
+
/**
|
|
529
|
+
* Role is the role for message types (e.g., "assistant")
|
|
530
|
+
*/
|
|
531
|
+
role?: string;
|
|
532
|
+
/**
|
|
533
|
+
* Status is the status of this output item (e.g., "completed")
|
|
534
|
+
*/
|
|
535
|
+
status?: string;
|
|
536
|
+
/**
|
|
537
|
+
* Type is the output item type (e.g., "message", "function_call")
|
|
538
|
+
*/
|
|
539
|
+
type?: string;
|
|
540
|
+
};
|
|
541
|
+
type LlmapiResponseRequest = {
|
|
542
|
+
/**
|
|
543
|
+
* Background indicates if request should be processed in background
|
|
544
|
+
*/
|
|
545
|
+
background?: boolean;
|
|
546
|
+
/**
|
|
547
|
+
* Conversation is the conversation ID (optional)
|
|
548
|
+
*/
|
|
549
|
+
conversation?: string;
|
|
550
|
+
/**
|
|
551
|
+
* Input is the simple text input for the response
|
|
552
|
+
*/
|
|
553
|
+
input: string;
|
|
554
|
+
/**
|
|
555
|
+
* MaxOutputTokens is the maximum number of tokens to generate
|
|
556
|
+
*/
|
|
557
|
+
max_output_tokens?: number;
|
|
558
|
+
/**
|
|
559
|
+
* Model is the model identifier in 'provider/model' format
|
|
560
|
+
*/
|
|
561
|
+
model: string;
|
|
562
|
+
/**
|
|
563
|
+
* PreviousResponseID is the ID of a previous response to continue from
|
|
564
|
+
*/
|
|
565
|
+
previous_response_id?: string;
|
|
566
|
+
/**
|
|
567
|
+
* Store indicates if the response should be stored
|
|
568
|
+
*/
|
|
569
|
+
store?: boolean;
|
|
570
|
+
/**
|
|
571
|
+
* Stream indicates if response should be streamed
|
|
572
|
+
*/
|
|
573
|
+
stream?: boolean;
|
|
574
|
+
/**
|
|
575
|
+
* Temperature controls randomness (0.0 to 2.0)
|
|
576
|
+
*/
|
|
577
|
+
temperature?: number;
|
|
578
|
+
/**
|
|
579
|
+
* ToolChoice controls which tool to use (auto, any, none, required, or tool name)
|
|
580
|
+
*/
|
|
581
|
+
tool_choice?: string;
|
|
582
|
+
/**
|
|
583
|
+
* Tools is an array of tool definitions (passed through, no MCP loop)
|
|
584
|
+
*/
|
|
585
|
+
tools?: Array<LlmapiTool>;
|
|
586
|
+
};
|
|
587
|
+
type LlmapiResponseResponse = {
|
|
588
|
+
/**
|
|
589
|
+
* Created is the Unix timestamp of creation (created_at in OpenAI format)
|
|
590
|
+
*/
|
|
591
|
+
created_at?: number;
|
|
592
|
+
extra_fields?: LlmapiResponseExtraFields;
|
|
593
|
+
/**
|
|
594
|
+
* ID is the unique response identifier
|
|
595
|
+
*/
|
|
596
|
+
id?: string;
|
|
597
|
+
/**
|
|
598
|
+
* Model is the model used for generation
|
|
599
|
+
*/
|
|
600
|
+
model?: string;
|
|
601
|
+
/**
|
|
602
|
+
* Object is the response type (e.g., "response")
|
|
603
|
+
*/
|
|
604
|
+
object?: string;
|
|
605
|
+
/**
|
|
606
|
+
* Output is the array of output items (OpenAI Responses API format)
|
|
607
|
+
*/
|
|
608
|
+
output?: Array<LlmapiResponseOutputItem>;
|
|
609
|
+
usage?: LlmapiResponseUsage;
|
|
610
|
+
};
|
|
611
|
+
/**
|
|
612
|
+
* Usage contains token usage information
|
|
613
|
+
*/
|
|
614
|
+
type LlmapiResponseUsage = {
|
|
615
|
+
/**
|
|
616
|
+
* CompletionTokens is the number of tokens in the completion
|
|
617
|
+
*/
|
|
618
|
+
completion_tokens?: number;
|
|
619
|
+
/**
|
|
620
|
+
* CostMicroUSD is the cost of this response in micro-dollars (USD × 1,000,000)
|
|
621
|
+
*/
|
|
622
|
+
cost_micro_usd?: number;
|
|
623
|
+
/**
|
|
624
|
+
* PromptTokens is the number of tokens in the prompt
|
|
625
|
+
*/
|
|
626
|
+
prompt_tokens?: number;
|
|
627
|
+
/**
|
|
628
|
+
* TotalTokens is the total number of tokens used
|
|
629
|
+
*/
|
|
630
|
+
total_tokens?: number;
|
|
631
|
+
};
|
|
472
632
|
/**
|
|
473
633
|
* Role is the message role (system, user, assistant)
|
|
474
634
|
*/
|
|
@@ -547,6 +707,52 @@ type LlmapiSearchUsage = {
|
|
|
547
707
|
*/
|
|
548
708
|
cost_micro_usd?: number;
|
|
549
709
|
};
|
|
710
|
+
type LlmapiTool = {
|
|
711
|
+
function?: LlmapiToolFunction;
|
|
712
|
+
/**
|
|
713
|
+
* Type is the tool type (function, code_interpreter, file_search, web_search)
|
|
714
|
+
*/
|
|
715
|
+
type?: string;
|
|
716
|
+
};
|
|
717
|
+
type LlmapiToolCall = {
|
|
718
|
+
function?: LlmapiToolCallFunction;
|
|
719
|
+
/**
|
|
720
|
+
* ID is the unique identifier for this tool call
|
|
721
|
+
*/
|
|
722
|
+
id?: string;
|
|
723
|
+
/**
|
|
724
|
+
* Type is the type of tool call (always "function" for now)
|
|
725
|
+
*/
|
|
726
|
+
type?: string;
|
|
727
|
+
};
|
|
728
|
+
/**
|
|
729
|
+
* Function contains the function call details
|
|
730
|
+
*/
|
|
731
|
+
type LlmapiToolCallFunction = {
|
|
732
|
+
/**
|
|
733
|
+
* Arguments is the JSON string of arguments to pass to the function
|
|
734
|
+
*/
|
|
735
|
+
arguments?: string;
|
|
736
|
+
/**
|
|
737
|
+
* Name is the name of the function to call
|
|
738
|
+
*/
|
|
739
|
+
name?: string;
|
|
740
|
+
};
|
|
741
|
+
/**
|
|
742
|
+
* Function is the function definition (when Type is "function")
|
|
743
|
+
*/
|
|
744
|
+
type LlmapiToolFunction = {
|
|
745
|
+
/**
|
|
746
|
+
* Arguments is the function arguments schema (JSON object)
|
|
747
|
+
*/
|
|
748
|
+
arguments?: {
|
|
749
|
+
[key: string]: unknown;
|
|
750
|
+
};
|
|
751
|
+
/**
|
|
752
|
+
* Name is the function name
|
|
753
|
+
*/
|
|
754
|
+
name?: string;
|
|
755
|
+
};
|
|
550
756
|
type ResponseErrorResponse = {
|
|
551
757
|
error?: string;
|
|
552
758
|
};
|
|
@@ -687,6 +893,33 @@ type GetApiV1ModelsResponses = {
|
|
|
687
893
|
200: LlmapiModelsListResponse;
|
|
688
894
|
};
|
|
689
895
|
type GetApiV1ModelsResponse = GetApiV1ModelsResponses[keyof GetApiV1ModelsResponses];
|
|
896
|
+
type PostApiV1ResponsesData = {
|
|
897
|
+
/**
|
|
898
|
+
* Response request
|
|
899
|
+
*/
|
|
900
|
+
body: LlmapiResponseRequest;
|
|
901
|
+
path?: never;
|
|
902
|
+
query?: never;
|
|
903
|
+
url: '/api/v1/responses';
|
|
904
|
+
};
|
|
905
|
+
type PostApiV1ResponsesErrors = {
|
|
906
|
+
/**
|
|
907
|
+
* Bad Request
|
|
908
|
+
*/
|
|
909
|
+
400: ResponseErrorResponse;
|
|
910
|
+
/**
|
|
911
|
+
* Internal Server Error
|
|
912
|
+
*/
|
|
913
|
+
500: ResponseErrorResponse;
|
|
914
|
+
};
|
|
915
|
+
type PostApiV1ResponsesError = PostApiV1ResponsesErrors[keyof PostApiV1ResponsesErrors];
|
|
916
|
+
type PostApiV1ResponsesResponses = {
|
|
917
|
+
/**
|
|
918
|
+
* OK
|
|
919
|
+
*/
|
|
920
|
+
200: LlmapiResponseResponse | string;
|
|
921
|
+
};
|
|
922
|
+
type PostApiV1ResponsesResponse = PostApiV1ResponsesResponses[keyof PostApiV1ResponsesResponses];
|
|
690
923
|
type PostApiV1SearchData = {
|
|
691
924
|
/**
|
|
692
925
|
* Search request
|
|
@@ -721,7 +954,7 @@ type PostAuthOauthByProviderExchangeData = {
|
|
|
721
954
|
body: HandlersExchangeRequest;
|
|
722
955
|
path: {
|
|
723
956
|
/**
|
|
724
|
-
* OAuth provider (google-drive)
|
|
957
|
+
* OAuth provider (google-drive, dropbox)
|
|
725
958
|
*/
|
|
726
959
|
provider: string;
|
|
727
960
|
};
|
|
@@ -753,7 +986,7 @@ type PostAuthOauthByProviderRefreshData = {
|
|
|
753
986
|
body: HandlersRefreshRequest;
|
|
754
987
|
path: {
|
|
755
988
|
/**
|
|
756
|
-
* OAuth provider (google-drive)
|
|
989
|
+
* OAuth provider (google-drive, dropbox)
|
|
757
990
|
*/
|
|
758
991
|
provider: string;
|
|
759
992
|
};
|
|
@@ -785,7 +1018,7 @@ type PostAuthOauthByProviderRevokeData = {
|
|
|
785
1018
|
body: HandlersRevokeRequest;
|
|
786
1019
|
path: {
|
|
787
1020
|
/**
|
|
788
|
-
* OAuth provider (google-drive)
|
|
1021
|
+
* OAuth provider (google-drive, dropbox)
|
|
789
1022
|
*/
|
|
790
1023
|
provider: string;
|
|
791
1024
|
};
|
|
@@ -1165,6 +1398,12 @@ declare const postApiV1ImagesGenerations: <ThrowOnError extends boolean = false>
|
|
|
1165
1398
|
* Returns a list of all available models from the configured gateway with optional filters. Models include modality information indicating their capabilities (e.g., llm, embedding, vision, image, audio, reasoning, code, reranker, multimodal, video).
|
|
1166
1399
|
*/
|
|
1167
1400
|
declare const getApiV1Models: <ThrowOnError extends boolean = false>(options?: Options<GetApiV1ModelsData, ThrowOnError>) => RequestResult<GetApiV1ModelsResponses, GetApiV1ModelsErrors, ThrowOnError>;
|
|
1401
|
+
/**
|
|
1402
|
+
* Create response
|
|
1403
|
+
*
|
|
1404
|
+
* Generates a response using the Responses API format. Supports streaming when stream=true.
|
|
1405
|
+
*/
|
|
1406
|
+
declare const postApiV1Responses: <ThrowOnError extends boolean = false>(options: Options<PostApiV1ResponsesData, ThrowOnError>) => RequestResult<PostApiV1ResponsesResponses, PostApiV1ResponsesErrors, ThrowOnError>;
|
|
1168
1407
|
/**
|
|
1169
1408
|
* Create search
|
|
1170
1409
|
*
|
|
@@ -1196,4 +1435,4 @@ declare const postAuthOauthByProviderRevoke: <ThrowOnError extends boolean = fal
|
|
|
1196
1435
|
*/
|
|
1197
1436
|
declare const getHealth: <ThrowOnError extends boolean = false>(options?: Options<GetHealthData, ThrowOnError>) => RequestResult<GetHealthResponses, GetHealthErrors, ThrowOnError>;
|
|
1198
1437
|
|
|
1199
|
-
export { type ClientOptions$1 as ClientOptions, type GetApiV1DocsSwaggerJsonData, type GetApiV1DocsSwaggerJsonResponse, type GetApiV1DocsSwaggerJsonResponses, type GetApiV1ModelsData, type GetApiV1ModelsError, type GetApiV1ModelsErrors, type GetApiV1ModelsResponse, type GetApiV1ModelsResponses, type GetHealthData, type GetHealthError, type GetHealthErrors, type GetHealthResponse, type GetHealthResponses, type HandlersExchangeRequest, type HandlersHealthResponse, type HandlersRefreshRequest, type HandlersRevokeRequest, type HandlersTokenResponse, type LlmapiChatCompletionExtraFields, type LlmapiChatCompletionRequest, type LlmapiChatCompletionResponse, type LlmapiChatCompletionUsage, type LlmapiChoice, type LlmapiEmbeddingData, type LlmapiEmbeddingExtraFields, type LlmapiEmbeddingRequest, type LlmapiEmbeddingResponse, type LlmapiEmbeddingUsage, type LlmapiImageGenerationExtraFields, type LlmapiImageGenerationImage, type LlmapiImageGenerationRequest, type LlmapiImageGenerationResponse, type LlmapiImageGenerationUsage, type LlmapiMessage, type LlmapiMessageContentImage, type LlmapiMessageContentPart, type LlmapiModel, type LlmapiModelArchitecture, type LlmapiModelPerRequestLimits, type LlmapiModelPricing, type LlmapiModelTopProvider, type LlmapiModelsListExtraFields, type LlmapiModelsListResponse, type LlmapiRole, type LlmapiSearchExtraFields, type LlmapiSearchRequest, type LlmapiSearchResponse, type LlmapiSearchResult, type LlmapiSearchUsage, type Options, type PostApiV1ChatCompletionsData, type PostApiV1ChatCompletionsError, type PostApiV1ChatCompletionsErrors, type PostApiV1ChatCompletionsResponse, type PostApiV1ChatCompletionsResponses, type PostApiV1EmbeddingsData, type PostApiV1EmbeddingsError, type PostApiV1EmbeddingsErrors, type PostApiV1EmbeddingsResponse, type PostApiV1EmbeddingsResponses, type PostApiV1ImagesGenerationsData, type PostApiV1ImagesGenerationsError, type PostApiV1ImagesGenerationsErrors, type PostApiV1ImagesGenerationsResponse, type PostApiV1ImagesGenerationsResponses, type PostApiV1SearchData, type PostApiV1SearchError, type PostApiV1SearchErrors, type PostApiV1SearchResponse, type PostApiV1SearchResponses, type PostAuthOauthByProviderExchangeData, type PostAuthOauthByProviderExchangeError, type PostAuthOauthByProviderExchangeErrors, type PostAuthOauthByProviderExchangeResponse, type PostAuthOauthByProviderExchangeResponses, type PostAuthOauthByProviderRefreshData, type PostAuthOauthByProviderRefreshError, type PostAuthOauthByProviderRefreshErrors, type PostAuthOauthByProviderRefreshResponse, type PostAuthOauthByProviderRefreshResponses, type PostAuthOauthByProviderRevokeData, type PostAuthOauthByProviderRevokeError, type PostAuthOauthByProviderRevokeErrors, type PostAuthOauthByProviderRevokeResponse, type PostAuthOauthByProviderRevokeResponses, type ResponseErrorResponse, getApiV1DocsSwaggerJson, getApiV1Models, getHealth, postApiV1ChatCompletions, postApiV1Embeddings, postApiV1ImagesGenerations, postApiV1Search, postAuthOauthByProviderExchange, postAuthOauthByProviderRefresh, postAuthOauthByProviderRevoke };
|
|
1438
|
+
export { type ClientOptions$1 as ClientOptions, type GetApiV1DocsSwaggerJsonData, type GetApiV1DocsSwaggerJsonResponse, type GetApiV1DocsSwaggerJsonResponses, type GetApiV1ModelsData, type GetApiV1ModelsError, type GetApiV1ModelsErrors, type GetApiV1ModelsResponse, type GetApiV1ModelsResponses, type GetHealthData, type GetHealthError, type GetHealthErrors, type GetHealthResponse, type GetHealthResponses, type HandlersExchangeRequest, type HandlersHealthResponse, type HandlersRefreshRequest, type HandlersRevokeRequest, type HandlersTokenResponse, type LlmapiChatCompletionExtraFields, type LlmapiChatCompletionRequest, type LlmapiChatCompletionResponse, type LlmapiChatCompletionUsage, type LlmapiChoice, type LlmapiEmbeddingData, type LlmapiEmbeddingExtraFields, type LlmapiEmbeddingRequest, type LlmapiEmbeddingResponse, type LlmapiEmbeddingUsage, type LlmapiImageGenerationExtraFields, type LlmapiImageGenerationImage, type LlmapiImageGenerationRequest, type LlmapiImageGenerationResponse, type LlmapiImageGenerationUsage, type LlmapiMessage, type LlmapiMessageContentImage, type LlmapiMessageContentPart, type LlmapiModel, type LlmapiModelArchitecture, type LlmapiModelPerRequestLimits, type LlmapiModelPricing, type LlmapiModelTopProvider, type LlmapiModelsListExtraFields, type LlmapiModelsListResponse, type LlmapiResponseExtraFields, type LlmapiResponseOutputContent, type LlmapiResponseOutputItem, type LlmapiResponseRequest, type LlmapiResponseResponse, type LlmapiResponseUsage, type LlmapiRole, type LlmapiSearchExtraFields, type LlmapiSearchRequest, type LlmapiSearchResponse, type LlmapiSearchResult, type LlmapiSearchUsage, type LlmapiTool, type LlmapiToolCall, type LlmapiToolCallFunction, type LlmapiToolFunction, type Options, type PostApiV1ChatCompletionsData, type PostApiV1ChatCompletionsError, type PostApiV1ChatCompletionsErrors, type PostApiV1ChatCompletionsResponse, type PostApiV1ChatCompletionsResponses, type PostApiV1EmbeddingsData, type PostApiV1EmbeddingsError, type PostApiV1EmbeddingsErrors, type PostApiV1EmbeddingsResponse, type PostApiV1EmbeddingsResponses, type PostApiV1ImagesGenerationsData, type PostApiV1ImagesGenerationsError, type PostApiV1ImagesGenerationsErrors, type PostApiV1ImagesGenerationsResponse, type PostApiV1ImagesGenerationsResponses, type PostApiV1ResponsesData, type PostApiV1ResponsesError, type PostApiV1ResponsesErrors, type PostApiV1ResponsesResponse, type PostApiV1ResponsesResponses, type PostApiV1SearchData, type PostApiV1SearchError, type PostApiV1SearchErrors, type PostApiV1SearchResponse, type PostApiV1SearchResponses, type PostAuthOauthByProviderExchangeData, type PostAuthOauthByProviderExchangeError, type PostAuthOauthByProviderExchangeErrors, type PostAuthOauthByProviderExchangeResponse, type PostAuthOauthByProviderExchangeResponses, type PostAuthOauthByProviderRefreshData, type PostAuthOauthByProviderRefreshError, type PostAuthOauthByProviderRefreshErrors, type PostAuthOauthByProviderRefreshResponse, type PostAuthOauthByProviderRefreshResponses, type PostAuthOauthByProviderRevokeData, type PostAuthOauthByProviderRevokeError, type PostAuthOauthByProviderRevokeErrors, type PostAuthOauthByProviderRevokeResponse, type PostAuthOauthByProviderRevokeResponses, type ResponseErrorResponse, getApiV1DocsSwaggerJson, getApiV1Models, getHealth, postApiV1ChatCompletions, postApiV1Embeddings, postApiV1ImagesGenerations, postApiV1Responses, postApiV1Search, postAuthOauthByProviderExchange, postAuthOauthByProviderRefresh, postAuthOauthByProviderRevoke };
|
package/dist/index.d.ts
CHANGED
|
@@ -319,6 +319,10 @@ type LlmapiMessage = {
|
|
|
319
319
|
*/
|
|
320
320
|
content?: Array<LlmapiMessageContentPart>;
|
|
321
321
|
role?: LlmapiRole;
|
|
322
|
+
/**
|
|
323
|
+
* ToolCalls contains tool/function calls made by the assistant (only for assistant role)
|
|
324
|
+
*/
|
|
325
|
+
tool_calls?: Array<LlmapiToolCall>;
|
|
322
326
|
};
|
|
323
327
|
/**
|
|
324
328
|
* ImageURL is used when Type=image_url
|
|
@@ -469,6 +473,162 @@ type LlmapiModelsListResponse = {
|
|
|
469
473
|
*/
|
|
470
474
|
next_page_token?: string;
|
|
471
475
|
};
|
|
476
|
+
/**
|
|
477
|
+
* ExtraFields contains additional metadata
|
|
478
|
+
*/
|
|
479
|
+
type LlmapiResponseExtraFields = {
|
|
480
|
+
/**
|
|
481
|
+
* Latency is the request latency in milliseconds
|
|
482
|
+
*/
|
|
483
|
+
latency?: number;
|
|
484
|
+
/**
|
|
485
|
+
* ModelRequested is the model that was requested
|
|
486
|
+
*/
|
|
487
|
+
model_requested?: string;
|
|
488
|
+
/**
|
|
489
|
+
* Provider is the LLM provider used (e.g., "openai", "anthropic")
|
|
490
|
+
*/
|
|
491
|
+
provider?: string;
|
|
492
|
+
/**
|
|
493
|
+
* RequestType is always "responses"
|
|
494
|
+
*/
|
|
495
|
+
request_type?: string;
|
|
496
|
+
};
|
|
497
|
+
type LlmapiResponseOutputContent = {
|
|
498
|
+
/**
|
|
499
|
+
* Text is the text content
|
|
500
|
+
*/
|
|
501
|
+
text?: string;
|
|
502
|
+
/**
|
|
503
|
+
* Type is the content type (e.g., "output_text")
|
|
504
|
+
*/
|
|
505
|
+
type?: string;
|
|
506
|
+
};
|
|
507
|
+
type LlmapiResponseOutputItem = {
|
|
508
|
+
/**
|
|
509
|
+
* Arguments is the function arguments for function_call types
|
|
510
|
+
*/
|
|
511
|
+
arguments?: string;
|
|
512
|
+
/**
|
|
513
|
+
* CallID is the call ID for function_call types
|
|
514
|
+
*/
|
|
515
|
+
call_id?: string;
|
|
516
|
+
/**
|
|
517
|
+
* Content is the content array for message types
|
|
518
|
+
*/
|
|
519
|
+
content?: Array<LlmapiResponseOutputContent>;
|
|
520
|
+
/**
|
|
521
|
+
* ID is the unique identifier for this output item
|
|
522
|
+
*/
|
|
523
|
+
id?: string;
|
|
524
|
+
/**
|
|
525
|
+
* Name is the function name for function_call types
|
|
526
|
+
*/
|
|
527
|
+
name?: string;
|
|
528
|
+
/**
|
|
529
|
+
* Role is the role for message types (e.g., "assistant")
|
|
530
|
+
*/
|
|
531
|
+
role?: string;
|
|
532
|
+
/**
|
|
533
|
+
* Status is the status of this output item (e.g., "completed")
|
|
534
|
+
*/
|
|
535
|
+
status?: string;
|
|
536
|
+
/**
|
|
537
|
+
* Type is the output item type (e.g., "message", "function_call")
|
|
538
|
+
*/
|
|
539
|
+
type?: string;
|
|
540
|
+
};
|
|
541
|
+
type LlmapiResponseRequest = {
|
|
542
|
+
/**
|
|
543
|
+
* Background indicates if request should be processed in background
|
|
544
|
+
*/
|
|
545
|
+
background?: boolean;
|
|
546
|
+
/**
|
|
547
|
+
* Conversation is the conversation ID (optional)
|
|
548
|
+
*/
|
|
549
|
+
conversation?: string;
|
|
550
|
+
/**
|
|
551
|
+
* Input is the simple text input for the response
|
|
552
|
+
*/
|
|
553
|
+
input: string;
|
|
554
|
+
/**
|
|
555
|
+
* MaxOutputTokens is the maximum number of tokens to generate
|
|
556
|
+
*/
|
|
557
|
+
max_output_tokens?: number;
|
|
558
|
+
/**
|
|
559
|
+
* Model is the model identifier in 'provider/model' format
|
|
560
|
+
*/
|
|
561
|
+
model: string;
|
|
562
|
+
/**
|
|
563
|
+
* PreviousResponseID is the ID of a previous response to continue from
|
|
564
|
+
*/
|
|
565
|
+
previous_response_id?: string;
|
|
566
|
+
/**
|
|
567
|
+
* Store indicates if the response should be stored
|
|
568
|
+
*/
|
|
569
|
+
store?: boolean;
|
|
570
|
+
/**
|
|
571
|
+
* Stream indicates if response should be streamed
|
|
572
|
+
*/
|
|
573
|
+
stream?: boolean;
|
|
574
|
+
/**
|
|
575
|
+
* Temperature controls randomness (0.0 to 2.0)
|
|
576
|
+
*/
|
|
577
|
+
temperature?: number;
|
|
578
|
+
/**
|
|
579
|
+
* ToolChoice controls which tool to use (auto, any, none, required, or tool name)
|
|
580
|
+
*/
|
|
581
|
+
tool_choice?: string;
|
|
582
|
+
/**
|
|
583
|
+
* Tools is an array of tool definitions (passed through, no MCP loop)
|
|
584
|
+
*/
|
|
585
|
+
tools?: Array<LlmapiTool>;
|
|
586
|
+
};
|
|
587
|
+
type LlmapiResponseResponse = {
|
|
588
|
+
/**
|
|
589
|
+
* Created is the Unix timestamp of creation (created_at in OpenAI format)
|
|
590
|
+
*/
|
|
591
|
+
created_at?: number;
|
|
592
|
+
extra_fields?: LlmapiResponseExtraFields;
|
|
593
|
+
/**
|
|
594
|
+
* ID is the unique response identifier
|
|
595
|
+
*/
|
|
596
|
+
id?: string;
|
|
597
|
+
/**
|
|
598
|
+
* Model is the model used for generation
|
|
599
|
+
*/
|
|
600
|
+
model?: string;
|
|
601
|
+
/**
|
|
602
|
+
* Object is the response type (e.g., "response")
|
|
603
|
+
*/
|
|
604
|
+
object?: string;
|
|
605
|
+
/**
|
|
606
|
+
* Output is the array of output items (OpenAI Responses API format)
|
|
607
|
+
*/
|
|
608
|
+
output?: Array<LlmapiResponseOutputItem>;
|
|
609
|
+
usage?: LlmapiResponseUsage;
|
|
610
|
+
};
|
|
611
|
+
/**
|
|
612
|
+
* Usage contains token usage information
|
|
613
|
+
*/
|
|
614
|
+
type LlmapiResponseUsage = {
|
|
615
|
+
/**
|
|
616
|
+
* CompletionTokens is the number of tokens in the completion
|
|
617
|
+
*/
|
|
618
|
+
completion_tokens?: number;
|
|
619
|
+
/**
|
|
620
|
+
* CostMicroUSD is the cost of this response in micro-dollars (USD × 1,000,000)
|
|
621
|
+
*/
|
|
622
|
+
cost_micro_usd?: number;
|
|
623
|
+
/**
|
|
624
|
+
* PromptTokens is the number of tokens in the prompt
|
|
625
|
+
*/
|
|
626
|
+
prompt_tokens?: number;
|
|
627
|
+
/**
|
|
628
|
+
* TotalTokens is the total number of tokens used
|
|
629
|
+
*/
|
|
630
|
+
total_tokens?: number;
|
|
631
|
+
};
|
|
472
632
|
/**
|
|
473
633
|
* Role is the message role (system, user, assistant)
|
|
474
634
|
*/
|
|
@@ -547,6 +707,52 @@ type LlmapiSearchUsage = {
|
|
|
547
707
|
*/
|
|
548
708
|
cost_micro_usd?: number;
|
|
549
709
|
};
|
|
710
|
+
type LlmapiTool = {
|
|
711
|
+
function?: LlmapiToolFunction;
|
|
712
|
+
/**
|
|
713
|
+
* Type is the tool type (function, code_interpreter, file_search, web_search)
|
|
714
|
+
*/
|
|
715
|
+
type?: string;
|
|
716
|
+
};
|
|
717
|
+
type LlmapiToolCall = {
|
|
718
|
+
function?: LlmapiToolCallFunction;
|
|
719
|
+
/**
|
|
720
|
+
* ID is the unique identifier for this tool call
|
|
721
|
+
*/
|
|
722
|
+
id?: string;
|
|
723
|
+
/**
|
|
724
|
+
* Type is the type of tool call (always "function" for now)
|
|
725
|
+
*/
|
|
726
|
+
type?: string;
|
|
727
|
+
};
|
|
728
|
+
/**
|
|
729
|
+
* Function contains the function call details
|
|
730
|
+
*/
|
|
731
|
+
type LlmapiToolCallFunction = {
|
|
732
|
+
/**
|
|
733
|
+
* Arguments is the JSON string of arguments to pass to the function
|
|
734
|
+
*/
|
|
735
|
+
arguments?: string;
|
|
736
|
+
/**
|
|
737
|
+
* Name is the name of the function to call
|
|
738
|
+
*/
|
|
739
|
+
name?: string;
|
|
740
|
+
};
|
|
741
|
+
/**
|
|
742
|
+
* Function is the function definition (when Type is "function")
|
|
743
|
+
*/
|
|
744
|
+
type LlmapiToolFunction = {
|
|
745
|
+
/**
|
|
746
|
+
* Arguments is the function arguments schema (JSON object)
|
|
747
|
+
*/
|
|
748
|
+
arguments?: {
|
|
749
|
+
[key: string]: unknown;
|
|
750
|
+
};
|
|
751
|
+
/**
|
|
752
|
+
* Name is the function name
|
|
753
|
+
*/
|
|
754
|
+
name?: string;
|
|
755
|
+
};
|
|
550
756
|
type ResponseErrorResponse = {
|
|
551
757
|
error?: string;
|
|
552
758
|
};
|
|
@@ -687,6 +893,33 @@ type GetApiV1ModelsResponses = {
|
|
|
687
893
|
200: LlmapiModelsListResponse;
|
|
688
894
|
};
|
|
689
895
|
type GetApiV1ModelsResponse = GetApiV1ModelsResponses[keyof GetApiV1ModelsResponses];
|
|
896
|
+
type PostApiV1ResponsesData = {
|
|
897
|
+
/**
|
|
898
|
+
* Response request
|
|
899
|
+
*/
|
|
900
|
+
body: LlmapiResponseRequest;
|
|
901
|
+
path?: never;
|
|
902
|
+
query?: never;
|
|
903
|
+
url: '/api/v1/responses';
|
|
904
|
+
};
|
|
905
|
+
type PostApiV1ResponsesErrors = {
|
|
906
|
+
/**
|
|
907
|
+
* Bad Request
|
|
908
|
+
*/
|
|
909
|
+
400: ResponseErrorResponse;
|
|
910
|
+
/**
|
|
911
|
+
* Internal Server Error
|
|
912
|
+
*/
|
|
913
|
+
500: ResponseErrorResponse;
|
|
914
|
+
};
|
|
915
|
+
type PostApiV1ResponsesError = PostApiV1ResponsesErrors[keyof PostApiV1ResponsesErrors];
|
|
916
|
+
type PostApiV1ResponsesResponses = {
|
|
917
|
+
/**
|
|
918
|
+
* OK
|
|
919
|
+
*/
|
|
920
|
+
200: LlmapiResponseResponse | string;
|
|
921
|
+
};
|
|
922
|
+
type PostApiV1ResponsesResponse = PostApiV1ResponsesResponses[keyof PostApiV1ResponsesResponses];
|
|
690
923
|
type PostApiV1SearchData = {
|
|
691
924
|
/**
|
|
692
925
|
* Search request
|
|
@@ -721,7 +954,7 @@ type PostAuthOauthByProviderExchangeData = {
|
|
|
721
954
|
body: HandlersExchangeRequest;
|
|
722
955
|
path: {
|
|
723
956
|
/**
|
|
724
|
-
* OAuth provider (google-drive)
|
|
957
|
+
* OAuth provider (google-drive, dropbox)
|
|
725
958
|
*/
|
|
726
959
|
provider: string;
|
|
727
960
|
};
|
|
@@ -753,7 +986,7 @@ type PostAuthOauthByProviderRefreshData = {
|
|
|
753
986
|
body: HandlersRefreshRequest;
|
|
754
987
|
path: {
|
|
755
988
|
/**
|
|
756
|
-
* OAuth provider (google-drive)
|
|
989
|
+
* OAuth provider (google-drive, dropbox)
|
|
757
990
|
*/
|
|
758
991
|
provider: string;
|
|
759
992
|
};
|
|
@@ -785,7 +1018,7 @@ type PostAuthOauthByProviderRevokeData = {
|
|
|
785
1018
|
body: HandlersRevokeRequest;
|
|
786
1019
|
path: {
|
|
787
1020
|
/**
|
|
788
|
-
* OAuth provider (google-drive)
|
|
1021
|
+
* OAuth provider (google-drive, dropbox)
|
|
789
1022
|
*/
|
|
790
1023
|
provider: string;
|
|
791
1024
|
};
|
|
@@ -1165,6 +1398,12 @@ declare const postApiV1ImagesGenerations: <ThrowOnError extends boolean = false>
|
|
|
1165
1398
|
* Returns a list of all available models from the configured gateway with optional filters. Models include modality information indicating their capabilities (e.g., llm, embedding, vision, image, audio, reasoning, code, reranker, multimodal, video).
|
|
1166
1399
|
*/
|
|
1167
1400
|
declare const getApiV1Models: <ThrowOnError extends boolean = false>(options?: Options<GetApiV1ModelsData, ThrowOnError>) => RequestResult<GetApiV1ModelsResponses, GetApiV1ModelsErrors, ThrowOnError>;
|
|
1401
|
+
/**
|
|
1402
|
+
* Create response
|
|
1403
|
+
*
|
|
1404
|
+
* Generates a response using the Responses API format. Supports streaming when stream=true.
|
|
1405
|
+
*/
|
|
1406
|
+
declare const postApiV1Responses: <ThrowOnError extends boolean = false>(options: Options<PostApiV1ResponsesData, ThrowOnError>) => RequestResult<PostApiV1ResponsesResponses, PostApiV1ResponsesErrors, ThrowOnError>;
|
|
1168
1407
|
/**
|
|
1169
1408
|
* Create search
|
|
1170
1409
|
*
|
|
@@ -1196,4 +1435,4 @@ declare const postAuthOauthByProviderRevoke: <ThrowOnError extends boolean = fal
|
|
|
1196
1435
|
*/
|
|
1197
1436
|
declare const getHealth: <ThrowOnError extends boolean = false>(options?: Options<GetHealthData, ThrowOnError>) => RequestResult<GetHealthResponses, GetHealthErrors, ThrowOnError>;
|
|
1198
1437
|
|
|
1199
|
-
export { type ClientOptions$1 as ClientOptions, type GetApiV1DocsSwaggerJsonData, type GetApiV1DocsSwaggerJsonResponse, type GetApiV1DocsSwaggerJsonResponses, type GetApiV1ModelsData, type GetApiV1ModelsError, type GetApiV1ModelsErrors, type GetApiV1ModelsResponse, type GetApiV1ModelsResponses, type GetHealthData, type GetHealthError, type GetHealthErrors, type GetHealthResponse, type GetHealthResponses, type HandlersExchangeRequest, type HandlersHealthResponse, type HandlersRefreshRequest, type HandlersRevokeRequest, type HandlersTokenResponse, type LlmapiChatCompletionExtraFields, type LlmapiChatCompletionRequest, type LlmapiChatCompletionResponse, type LlmapiChatCompletionUsage, type LlmapiChoice, type LlmapiEmbeddingData, type LlmapiEmbeddingExtraFields, type LlmapiEmbeddingRequest, type LlmapiEmbeddingResponse, type LlmapiEmbeddingUsage, type LlmapiImageGenerationExtraFields, type LlmapiImageGenerationImage, type LlmapiImageGenerationRequest, type LlmapiImageGenerationResponse, type LlmapiImageGenerationUsage, type LlmapiMessage, type LlmapiMessageContentImage, type LlmapiMessageContentPart, type LlmapiModel, type LlmapiModelArchitecture, type LlmapiModelPerRequestLimits, type LlmapiModelPricing, type LlmapiModelTopProvider, type LlmapiModelsListExtraFields, type LlmapiModelsListResponse, type LlmapiRole, type LlmapiSearchExtraFields, type LlmapiSearchRequest, type LlmapiSearchResponse, type LlmapiSearchResult, type LlmapiSearchUsage, type Options, type PostApiV1ChatCompletionsData, type PostApiV1ChatCompletionsError, type PostApiV1ChatCompletionsErrors, type PostApiV1ChatCompletionsResponse, type PostApiV1ChatCompletionsResponses, type PostApiV1EmbeddingsData, type PostApiV1EmbeddingsError, type PostApiV1EmbeddingsErrors, type PostApiV1EmbeddingsResponse, type PostApiV1EmbeddingsResponses, type PostApiV1ImagesGenerationsData, type PostApiV1ImagesGenerationsError, type PostApiV1ImagesGenerationsErrors, type PostApiV1ImagesGenerationsResponse, type PostApiV1ImagesGenerationsResponses, type PostApiV1SearchData, type PostApiV1SearchError, type PostApiV1SearchErrors, type PostApiV1SearchResponse, type PostApiV1SearchResponses, type PostAuthOauthByProviderExchangeData, type PostAuthOauthByProviderExchangeError, type PostAuthOauthByProviderExchangeErrors, type PostAuthOauthByProviderExchangeResponse, type PostAuthOauthByProviderExchangeResponses, type PostAuthOauthByProviderRefreshData, type PostAuthOauthByProviderRefreshError, type PostAuthOauthByProviderRefreshErrors, type PostAuthOauthByProviderRefreshResponse, type PostAuthOauthByProviderRefreshResponses, type PostAuthOauthByProviderRevokeData, type PostAuthOauthByProviderRevokeError, type PostAuthOauthByProviderRevokeErrors, type PostAuthOauthByProviderRevokeResponse, type PostAuthOauthByProviderRevokeResponses, type ResponseErrorResponse, getApiV1DocsSwaggerJson, getApiV1Models, getHealth, postApiV1ChatCompletions, postApiV1Embeddings, postApiV1ImagesGenerations, postApiV1Search, postAuthOauthByProviderExchange, postAuthOauthByProviderRefresh, postAuthOauthByProviderRevoke };
|
|
1438
|
+
export { type ClientOptions$1 as ClientOptions, type GetApiV1DocsSwaggerJsonData, type GetApiV1DocsSwaggerJsonResponse, type GetApiV1DocsSwaggerJsonResponses, type GetApiV1ModelsData, type GetApiV1ModelsError, type GetApiV1ModelsErrors, type GetApiV1ModelsResponse, type GetApiV1ModelsResponses, type GetHealthData, type GetHealthError, type GetHealthErrors, type GetHealthResponse, type GetHealthResponses, type HandlersExchangeRequest, type HandlersHealthResponse, type HandlersRefreshRequest, type HandlersRevokeRequest, type HandlersTokenResponse, type LlmapiChatCompletionExtraFields, type LlmapiChatCompletionRequest, type LlmapiChatCompletionResponse, type LlmapiChatCompletionUsage, type LlmapiChoice, type LlmapiEmbeddingData, type LlmapiEmbeddingExtraFields, type LlmapiEmbeddingRequest, type LlmapiEmbeddingResponse, type LlmapiEmbeddingUsage, type LlmapiImageGenerationExtraFields, type LlmapiImageGenerationImage, type LlmapiImageGenerationRequest, type LlmapiImageGenerationResponse, type LlmapiImageGenerationUsage, type LlmapiMessage, type LlmapiMessageContentImage, type LlmapiMessageContentPart, type LlmapiModel, type LlmapiModelArchitecture, type LlmapiModelPerRequestLimits, type LlmapiModelPricing, type LlmapiModelTopProvider, type LlmapiModelsListExtraFields, type LlmapiModelsListResponse, type LlmapiResponseExtraFields, type LlmapiResponseOutputContent, type LlmapiResponseOutputItem, type LlmapiResponseRequest, type LlmapiResponseResponse, type LlmapiResponseUsage, type LlmapiRole, type LlmapiSearchExtraFields, type LlmapiSearchRequest, type LlmapiSearchResponse, type LlmapiSearchResult, type LlmapiSearchUsage, type LlmapiTool, type LlmapiToolCall, type LlmapiToolCallFunction, type LlmapiToolFunction, type Options, type PostApiV1ChatCompletionsData, type PostApiV1ChatCompletionsError, type PostApiV1ChatCompletionsErrors, type PostApiV1ChatCompletionsResponse, type PostApiV1ChatCompletionsResponses, type PostApiV1EmbeddingsData, type PostApiV1EmbeddingsError, type PostApiV1EmbeddingsErrors, type PostApiV1EmbeddingsResponse, type PostApiV1EmbeddingsResponses, type PostApiV1ImagesGenerationsData, type PostApiV1ImagesGenerationsError, type PostApiV1ImagesGenerationsErrors, type PostApiV1ImagesGenerationsResponse, type PostApiV1ImagesGenerationsResponses, type PostApiV1ResponsesData, type PostApiV1ResponsesError, type PostApiV1ResponsesErrors, type PostApiV1ResponsesResponse, type PostApiV1ResponsesResponses, type PostApiV1SearchData, type PostApiV1SearchError, type PostApiV1SearchErrors, type PostApiV1SearchResponse, type PostApiV1SearchResponses, type PostAuthOauthByProviderExchangeData, type PostAuthOauthByProviderExchangeError, type PostAuthOauthByProviderExchangeErrors, type PostAuthOauthByProviderExchangeResponse, type PostAuthOauthByProviderExchangeResponses, type PostAuthOauthByProviderRefreshData, type PostAuthOauthByProviderRefreshError, type PostAuthOauthByProviderRefreshErrors, type PostAuthOauthByProviderRefreshResponse, type PostAuthOauthByProviderRefreshResponses, type PostAuthOauthByProviderRevokeData, type PostAuthOauthByProviderRevokeError, type PostAuthOauthByProviderRevokeErrors, type PostAuthOauthByProviderRevokeResponse, type PostAuthOauthByProviderRevokeResponses, type ResponseErrorResponse, getApiV1DocsSwaggerJson, getApiV1Models, getHealth, postApiV1ChatCompletions, postApiV1Embeddings, postApiV1ImagesGenerations, postApiV1Responses, postApiV1Search, postAuthOauthByProviderExchange, postAuthOauthByProviderRefresh, postAuthOauthByProviderRevoke };
|
package/dist/index.mjs
CHANGED
|
@@ -856,6 +856,16 @@ var getApiV1Models = (options) => {
|
|
|
856
856
|
...options
|
|
857
857
|
});
|
|
858
858
|
};
|
|
859
|
+
var postApiV1Responses = (options) => {
|
|
860
|
+
return (options.client ?? client).post({
|
|
861
|
+
url: "/api/v1/responses",
|
|
862
|
+
...options,
|
|
863
|
+
headers: {
|
|
864
|
+
"Content-Type": "application/json",
|
|
865
|
+
...options.headers
|
|
866
|
+
}
|
|
867
|
+
});
|
|
868
|
+
};
|
|
859
869
|
var postApiV1Search = (options) => {
|
|
860
870
|
return (options.client ?? client).post({
|
|
861
871
|
url: "/api/v1/search",
|
|
@@ -909,6 +919,7 @@ export {
|
|
|
909
919
|
postApiV1ChatCompletions,
|
|
910
920
|
postApiV1Embeddings,
|
|
911
921
|
postApiV1ImagesGenerations,
|
|
922
|
+
postApiV1Responses,
|
|
912
923
|
postApiV1Search,
|
|
913
924
|
postAuthOauthByProviderExchange,
|
|
914
925
|
postAuthOauthByProviderRefresh,
|