char-fork/llama.cpp

git clone https://git.t4t.associates/char-fork/llama.cpp

Aleksander Grygierui: Constants refactor (#26908)e21152dc9

char/aliceai-t5-moe
745 B23 linesraw
1export const ERROR_MESSAGES = {
2	HTTP: {
3		ACCESS_DENIED: 'Access denied',
4		GENERIC: 'Request failed',
5		INTERNAL_ERROR: 'Server error - check server logs',
6		NOT_FOUND: 'Not found',
7		TEMPORARILY_UNAVAILABLE: 'Server temporarily unavailable'
8	},
9	NETWORK: {
10		GENERIC: 'Failed to connect to server',
11		NXDOMAIN: 'Server not found - check server address',
12		REFUSED: 'Connection refused - server may be offline',
13		TIMEOUT: 'Request timed out',
14		UNREACHABLE: 'Server is not running or unreachable'
15	}
16};
17
18export const HTTP_CODE_TO_STRING: Record<string, string> = {
19	401: ERROR_MESSAGES.HTTP.ACCESS_DENIED,
20	403: ERROR_MESSAGES.HTTP.ACCESS_DENIED,
21	500: ERROR_MESSAGES.HTTP.INTERNAL_ERROR,
22	503: ERROR_MESSAGES.HTTP.TEMPORARILY_UNAVAILABLE
23};