🧼 refactor(AppService): Consolidate Logic & Issue more Warnings (#2468)

* chore: bump example config version

* refactor(AppService): issue warnings from separate modules where possible

* refactor(AppService): consolidate AppService logic to separate modules as much as possible

* chore: bump data-provider

* chore: remove unn. variable definition

* chore: warning wording
This commit is contained in:
Danny Avila 2024-04-19 12:05:39 -04:00 committed by GitHub
parent de3987cbaf
commit 3d1dec62a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 231 additions and 149 deletions

View file

@ -1,5 +1,6 @@
/* eslint-disable max-len */
import { z } from 'zod';
import type { ZodError } from 'zod';
import { EModelEndpoint, eModelEndpointSchema } from './schemas';
import { fileConfigSchema } from './file-config';
import { FileSources } from './types/files';
@ -81,6 +82,11 @@ export type TValidatedAzureConfig = {
groupMap: TAzureGroupMap;
};
export type TAzureConfigValidationResult = TValidatedAzureConfig & {
isValid: boolean;
errors: (ZodError | string)[];
};
export enum Capabilities {
code_interpreter = 'code_interpreter',
image_vision = 'image_vision',
@ -173,7 +179,7 @@ export const azureEndpointSchema = z
);
export type TAzureConfig = Omit<z.infer<typeof azureEndpointSchema>, 'groups'> &
TValidatedAzureConfig;
TAzureConfigValidationResult;
export const rateLimitSchema = z.object({
fileUploads: z