Skip to content

Commit ebacd87

Browse files
Adam BaloghAdam Balogh
authored andcommitted
bypass limit
1 parent 5a1a518 commit ebacd87

4 files changed

Lines changed: 13 additions & 8 deletions

File tree

agent/agent_executors.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def create_routing_model() -> ChatOpenAI:
5858
openai_api_base=BASE_URL,
5959
openai_api_key=API_KEY,
6060
request_timeout=60,
61-
default_headers={"X-Title": "two-ligma"},
61+
default_headers={"X-Title": "opengradient-bitquant"},
6262
)
6363

6464

@@ -71,7 +71,7 @@ def create_suggestions_model() -> ChatOpenAI:
7171
request_timeout=60,
7272
max_tokens=500,
7373
streaming=False,
74-
default_headers={"X-Title": "two-ligma"},
74+
default_headers={"X-Title": "opengradient-bitquant"},
7575
)
7676

7777

@@ -84,7 +84,7 @@ def create_investor_executor() -> CompiledGraph:
8484
request_timeout=60,
8585
max_tokens=4096,
8686
streaming=False,
87-
default_headers={"X-Title": "two-ligma"},
87+
default_headers={"X-Title": "opengradient-bitquant"},
8888
)
8989
agent_executor = create_react_agent(
9090
model=openai_model, tools=create_investor_agent_toolkit()
@@ -102,7 +102,7 @@ def create_analytics_executor(token_metadata_repo: TokenMetadataRepo) -> Compile
102102
request_timeout=60,
103103
max_tokens=4096,
104104
streaming=False,
105-
default_headers={"X-Title": "two-ligma"},
105+
default_headers={"X-Title": "opengradient-bitquant"},
106106
)
107107
analytics_executor = create_react_agent(
108108
model=openai_model,

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
2-
name = "two-ligma"
2+
name = "bitquant"
33
version = "0.1.0"
4-
description = "OpenGradient TwoLigma"
4+
description = "OpenGradient BitQuant"
55
requires-python = ">=3.8"
66

77
[tool.black]

server/activity_tracker.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
from datetime import datetime, timezone
44
from typing import Optional
55

6+
from config import MINER_WALLET_ADDRESS
7+
68

79
@dataclass
810
class ActivityStats:
@@ -51,8 +53,8 @@ def increment_message_count(self, user_address: str) -> bool:
5153
if last_message_date != today:
5254
daily_message_count = 0
5355

54-
# Check if daily limit reached
55-
if daily_message_count >= self.DAILY_MESSAGE_LIMIT:
56+
# Check if daily limit reached, except for Subnet miner wallet
57+
if daily_message_count >= self.DAILY_MESSAGE_LIMIT and user_address != MINER_WALLET_ADDRESS:
5658
return False
5759

5860
# Update both total and daily message counts

server/config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
# See if we are running in subnet mode
55
SUBNET_MODE = os.getenv("subnet_mode", "false").lower() == "true"
66
logging.info(f"Running in subnet mode: {SUBNET_MODE}")
7+
8+
# Bypass daily limit for miner wallet
9+
MINER_WALLET_ADDRESS = "7FVPurQDkbj6g9dm5B52oCUr7JxqRpoYQcNitKaWVSgS"

0 commit comments

Comments
 (0)