最后活跃于 1730064573

cyberes's Avatar cyberes 修订了这个 Gist 1730064573. 跳至此修订

1 file changed, 1 insertion, 1 deletion

README.md

@@ -1,2 +1,2 @@
1 1 1. Install LiteLLM.
2 - 2. Edit `/srv/litellm/venv/lib/python3.XX/site-packages/litellm/proxy/auth/litellm_license.py`
2 + 2. Edit `venv/lib/python3.XX/site-packages/litellm/proxy/auth/litellm_license.py`

cyberes's Avatar cyberes 修订了这个 Gist 1730064565. 跳至此修订

2 files changed, 40 insertions

README.md(file created)

@@ -0,0 +1,2 @@
1 + 1. Install LiteLLM.
2 + 2. Edit `/srv/litellm/venv/lib/python3.XX/site-packages/litellm/proxy/auth/litellm_license.py`

litellm_license.py(file created)

@@ -0,0 +1,38 @@
1 + # What is this?
2 + ## If litellm license in env, checks if it's valid
3 + import base64
4 + import json
5 + import os
6 + import traceback
7 + from datetime import datetime
8 +
9 + from litellm._logging import verbose_proxy_logger
10 + from litellm.llms.custom_httpx.http_handler import HTTPHandler
11 +
12 +
13 + class LicenseCheck:
14 + """
15 + - Check if license in env
16 + - Returns if license is valid
17 + """
18 +
19 + base_url = "https://license.litellm.ai"
20 +
21 + def __init__(self) -> None:
22 + self.license_str = "GET FUCKED LOL"
23 + verbose_proxy_logger.debug("License Str value - {}".format(self.license_str))
24 + self.http_handler = HTTPHandler()
25 + self.public_key = None
26 + self.read_public_key()
27 +
28 + def read_public_key(self):
29 + return
30 +
31 + def _verify(self, license_str: str) -> bool:
32 + return True
33 +
34 + def is_premium(self) -> bool:
35 + return True
36 +
37 + def verify_license_without_api_request(self, public_key, license_key):
38 + return Ture
更新 更早