gpts: providers: add openrouter (#263)

This commit is contained in:
end-4 2024-06-06 21:22:55 +07:00
parent 8ddc7f2aee
commit 2a11489541
2 changed files with 50 additions and 2 deletions

View file

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
version="1.1"
width="20.000015"
height="20"
id="svg1"
sodipodi:docname="openrouter-symbolic.svg"
viewBox="0 0 47.999998 47.999962"
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#505050"
inkscape:zoom="19.666667"
inkscape:cx="6.7118644"
inkscape:cy="10.805085"
inkscape:window-width="1908"
inkscape:window-height="1028"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg1" />
<path
d="m 32.999999,2.9999808 c 3.980422,0.5880984 6.862472,1.8203168 10.3125,3.875 0.883008,0.5130469 1.766016,1.0260937 2.675781,1.5546875 0.663867,0.5182031 1.327735,1.0364062 2.011719,1.5703125 0,0.9900002 0,1.9800002 0,3.0000002 -2.311036,1.335928 -4.623718,2.668844 -6.9375,4 -0.659355,0.381562 -1.318711,0.763125 -1.998047,1.15625 -4.951172,2.84375 -4.951172,2.84375 -6.064453,2.84375 0,-1.65 0,-3.3 0,-5 -6.609294,1.004133 -10.792298,2.789518 -16,7 3.696448,3.823912 6.292078,6.155833 11.6875,6.625 0.808242,0.07477 1.616484,0.149531 2.449219,0.226562 0.614883,0.04898 1.229765,0.09797 1.863281,0.148438 0,-0.99 0,-1.98 0,-3 4.062255,0.578231 6.847624,1.891177 10.3125,4.0625 0.883008,0.547852 1.766016,1.095703 2.675781,1.660156 0.663867,0.421524 1.327735,0.843047 2.011719,1.277344 -1.156668,3.470003 -1.857267,3.847015 -4.875,5.6875 -0.698672,0.436992 -1.397344,0.873984 -2.117188,1.324219 -2.007812,0.988281 -2.007812,0.988281 -5.007812,0.988281 0,0.66 0,1.32 0,2 -0.99,0.33 -1.98,0.66 -3,1 0,-1.32 0,-2.64 0,-4 C 32.359335,40.962601 31.718671,40.925211 31.058593,40.8867 22.287404,40.220037 16.393127,37.373973 9.2226552,32.429668 6.2608222,30.524517 3.2830902,29.257335 -8.4473381e-7,27.999981 c 0,-3.3 0,-6.6 0,-10 C 1.6232682,17.32911 3.2486752,16.663411 4.8749992,15.999981 c 0.904922,-0.37125 1.809844,-0.7425 2.742188,-1.125 2.382812,-0.875 2.382812,-0.875 4.3828118,-0.875 0,-0.66 0,-1.32 0,-2 0.99,0 1.98,0 3,0 0,-0.66 0,-1.32 0,-2.0000002 6.284532,-3.3279791 10.886587,-4.4516452 18,-4 0,-0.99 0,-1.98 0,-3 z"
fill="#93a2b8"
id="path1"
style="fill:#000000" />
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

View file

@ -17,7 +17,7 @@ const PROVIDERS = { // There's this list hmm https://github.com/zukixa/cool-ai-s
'model': 'gpt-3.5-turbo',
},
'ollama': {
'name': 'Ollama',
'name': 'Ollama (Llama 3)',
'logo_name': 'ollama-symbolic',
'description': 'Official Ollama API.\nPricing: Free.',
'base_url': 'http://localhost:11434/v1/chat/completions',
@ -25,6 +25,15 @@ const PROVIDERS = { // There's this list hmm https://github.com/zukixa/cool-ai-s
'key_file': 'ollama_key.txt',
'model': 'llama3:instruct',
},
'openrouter': {
'name': 'OpenRouter (Llama-3-70B)',
'logo_name': 'openrouter-symbolic',
'description': 'A unified interface for LLMs',
'base_url': 'https://openrouter.ai/api/v1/chat/completions',
'key_get_url': 'https://openrouter.ai/keys',
'key_file': 'openrouter_key.txt',
'model': 'meta-llama/llama-3-70b-instruct',
},
'oxygen4o': {
'name': 'Oxygen (GPT-4o)',
'logo_name': 'ai-oxygen-symbolic',
@ -44,7 +53,7 @@ const PROVIDERS = { // There's this list hmm https://github.com/zukixa/cool-ai-s
'model': 'gpt-3.5-turbo',
},
'zukijourney': {
'name': 'zukijourney',
'name': 'zukijourney (GPT-3.5)',
'logo_name': 'ai-zukijourney',
'description': 'An API from @zukixa on GitHub.\nNote: Keys are IP-locked so it\'s buggy sometimes\nPricing: Free: 10/min, 800/day.\nRequires you to join their Discord for a key',
'base_url': 'https://zukijourney.xyzbot.net/v1/chat/completions',