Many-in-one AI client.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
634 B

  1. export enum FinishReason {
  2. STOP = 'stop',
  3. LENGTH = 'length',
  4. }
  5. export interface ChoiceBase {
  6. index: number;
  7. }
  8. export interface FinishableChoiceBase extends ChoiceBase {
  9. finish_reason: FinishReason | null;
  10. }
  11. export type DataEventId = string;
  12. export type Timestamp = number;
  13. export interface CreatedResource {
  14. created: Timestamp;
  15. }
  16. export enum ApiVersion {
  17. V1 = 'v1',
  18. }
  19. export interface Configuration {
  20. organizationId?: string;
  21. apiVersion: ApiVersion;
  22. apiKey: string;
  23. baseUrl?: string;
  24. }
  25. export enum ResponseObjectType {
  26. LIST = 'list',
  27. }
  28. export const DEFAULT_BASE_URL = 'https://api.openai.com' as const;