test: add CI/CD workflow

This commit is contained in:
eligrinfeld
2025-01-05 14:16:31 -07:00
parent 66d44c0774
commit ce97671da3
28 changed files with 11684 additions and 1199 deletions

View File

@@ -15,7 +15,10 @@ const envSchema = z.object({
SEARXNG_INSTANCES: z.string().default('["http://localhost:4000"]'),
MAX_RESULTS_PER_QUERY: z.string().default('50'),
CACHE_DURATION_HOURS: z.string().default('24'),
CACHE_DURATION_DAYS: z.string().default('7')
CACHE_DURATION_DAYS: z.string().default('7'),
HUGGING_FACE_API_KEY: z.string({
required_error: "HUGGING_FACE_API_KEY is required in .env"
})
});
// Define the final environment type
@@ -39,6 +42,15 @@ export interface EnvConfig {
durationHours: number;
durationDays: number;
};
ai: {
model: string;
temperature: number;
maxTokens: number;
batchSize: number;
};
huggingface: {
apiKey: string;
};
}
// Parse and transform the environment variables
@@ -64,5 +76,14 @@ export const env: EnvConfig = {
maxResultsPerQuery: parseInt(rawEnv.MAX_RESULTS_PER_QUERY),
durationHours: parseInt(rawEnv.CACHE_DURATION_HOURS),
durationDays: parseInt(rawEnv.CACHE_DURATION_DAYS)
},
ai: {
model: 'deepseek-ai/deepseek-coder-6.7b-instruct',
temperature: 0.7,
maxTokens: 512,
batchSize: 3
},
huggingface: {
apiKey: rawEnv.HUGGING_FACE_API_KEY
}
};