venice-ai-sdk-apl
Version:
A comprehensive SDK for the Venice AI API with CLI support, programmatic CLI usage, CLI-style interface, and interactive demo
183 lines (182 loc) • 6.15 kB
TypeScript
/**
* Venice AI API SDK
*
* A comprehensive SDK for the Venice AI API with educational examples for every endpoint.
* This SDK follows APL (API Programming Library) principles to provide a simple, intuitive
* interface for interacting with the Venice AI API.
*
* @packageDocumentation
*/
import { VeniceAI } from './client';
import * as Types from './types';
import * as Errors from './errors';
export { VeniceAI };
export { Types, Errors };
export declare const cli: {
commands: {
chat: (prompt: string, options?: {
model?: string | undefined;
webSearch?: string | boolean | undefined;
system?: string | undefined;
raw?: boolean | undefined;
image?: string | undefined;
stream?: boolean | undefined;
noSystemPrompt?: boolean | undefined;
character?: string | undefined;
functions?: string | undefined;
functionsFile?: string | undefined;
forceFunctionCall?: boolean | undefined;
modelFeatures?: string | undefined;
}) => Promise<string | Types.ChatCompletionResponse | {
stream: boolean;
requestParams: any;
} | null>;
listKeys: (options?: {
limit?: number | undefined;
raw?: boolean | undefined;
type?: string | undefined;
}) => Promise<Types.ListApiKeysResponse | {
keys: never[];
total: number;
filtered?: undefined;
} | {
keys: {
id: any;
name: any;
created: Date | null;
expires: Date | null;
type: any;
lastUsed: Date | null;
usage: any;
}[];
total: number;
filtered: number;
}>;
createKey: (name: string, options?: {
raw?: boolean | undefined;
}) => Promise<Types.CreateApiKeyResponse | {
id: string;
key: string;
name: string;
created: Date;
expires: Date | null;
}>;
deleteKey: (id: string, options?: {
raw?: boolean | undefined;
}) => Promise<Types.DeleteApiKeyResponse>;
listModels: (options?: {
limit?: number | undefined;
raw?: boolean | undefined;
type?: string | undefined;
}) => Promise<Types.ListModelsResponse | {
models: {
id: any;
name: any;
type: any;
}[];
total: number;
filtered: number;
}>;
generateImage: (prompt: string, options?: {
model?: string | undefined;
negative?: string | undefined;
style?: string | undefined;
height?: number | undefined;
width?: number | undefined;
outputPath?: string | undefined;
raw?: boolean | undefined;
}) => Promise<Types.GenerateImageResponse | {
url: string | undefined;
} | {
savedTo: string;
url: string | undefined;
}>;
listStyles: (options?: {
limit?: number | undefined;
raw?: boolean | undefined;
}) => Promise<Types.ListImageStylesResponse | {
styles: {
id: any;
name: any;
description: any;
}[];
total: number;
}>;
configure: (apiKey: string) => {
success: boolean;
};
enableDebug: () => {
debug: boolean;
};
disableDebug: () => {
debug: boolean;
};
rateLimits: (options?: {
model?: string | undefined;
raw?: boolean | undefined;
}) => Promise<any>;
listCharacters: (options?: {
limit?: number | undefined;
raw?: boolean | undefined;
}) => Promise<import("./types/characters").ListCharactersResponse | {
characters: {
name: any;
slug: any;
description: any;
model: any;
}[];
total: number;
filtered: number;
}>;
vvvCirculatingSupply: (options?: {
raw?: boolean | undefined;
}) => Promise<import("./types/vvv").VVVCirculatingSupplyResponse | {
circulating_supply: number;
total_supply: number | undefined;
percentage_circulating: string | number;
timestamp: string;
}>;
vvvUtilization: (options?: {
raw?: boolean | undefined;
}) => Promise<import("./types/vvv").VVVUtilizationResponse | {
utilization_percentage: string;
timestamp: string;
capacity?: undefined;
usage?: undefined;
historical_data?: undefined;
} | {
utilization_percentage: string;
capacity: number | undefined;
usage: number | undefined;
timestamp: string;
historical_data: {
timestamp: string;
utilization_percentage: number;
}[] | undefined;
}>;
vvvStakingYield: (options?: {
raw?: boolean | undefined;
}) => Promise<import("./types/vvv").VVVStakingYieldResponse | {
current_apy: string;
total_staked: number;
total_emission: string | undefined;
staker_distribution: string | undefined;
timestamp: string;
percentage_staked?: undefined;
historical_data?: undefined;
} | {
current_apy: string;
total_staked: number;
percentage_staked: string;
timestamp: string;
historical_data: {
timestamp: string;
apy: number;
}[] | undefined;
total_emission?: undefined;
staker_distribution?: undefined;
}>;
};
run: () => void;
};
export default VeniceAI;