Public Access
Initial commit: LiteLLM config + docker-compose + helper scripts
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import subprocess
|
||||
|
||||
# Read current proxy
|
||||
with open("/opt/ai-proxy/proxy.py") as f:
|
||||
code = f.read()
|
||||
|
||||
# Remove gemini-1 provider (from "name": "gemini-1" to the closing },)
|
||||
import re
|
||||
code = re.sub(
|
||||
r'\s*\{\s*\n\s*"name":\s*"gemini-1",.*?\n\s*\},',
|
||||
'',
|
||||
code,
|
||||
flags=re.DOTALL
|
||||
)
|
||||
|
||||
with open("/opt/ai-proxy/proxy.py", "w") as f:
|
||||
f.write(code)
|
||||
|
||||
print("Gemini removed!")
|
||||
|
||||
subprocess.run(["systemctl", "restart", "ai-proxy"], capture_output=True)
|
||||
print("Proxy restarted!")
|
||||
Reference in New Issue
Block a user