mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
feat(ml): support multiple urls (#14347)
* support multiple url * update api * styling unnecessary `?.` * update docs, make new url field go first add load balancing section * update tests doc formatting wording wording linting * small styling * `url` -> `urls` * fix tests * update docs * make docusaurus happy --------- Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
parent
411878c0aa
commit
4bf1b84cc2
22 changed files with 202 additions and 73 deletions
|
|
@ -85,7 +85,7 @@ const updatedConfig = Object.freeze<SystemConfig>({
|
|||
},
|
||||
machineLearning: {
|
||||
enabled: true,
|
||||
url: 'http://immich-machine-learning:3003',
|
||||
urls: ['http://immich-machine-learning:3003'],
|
||||
clip: {
|
||||
enabled: true,
|
||||
modelName: 'ViT-B-32__openai',
|
||||
|
|
@ -330,11 +330,11 @@ describe(SystemConfigService.name, () => {
|
|||
|
||||
it('should allow underscores in the machine learning url', async () => {
|
||||
configMock.getEnv.mockReturnValue(mockEnvData({ configFile: 'immich-config.json' }));
|
||||
const partialConfig = { machineLearning: { url: 'immich_machine_learning' } };
|
||||
const partialConfig = { machineLearning: { urls: ['immich_machine_learning'] } };
|
||||
systemMock.readFile.mockResolvedValue(JSON.stringify(partialConfig));
|
||||
|
||||
const config = await sut.getSystemConfig();
|
||||
expect(config.machineLearning.url).toEqual('immich_machine_learning');
|
||||
expect(config.machineLearning.urls).toEqual(['immich_machine_learning']);
|
||||
});
|
||||
|
||||
const externalDomainTests = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue