We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb73442 commit 593d5d6Copy full SHA for 593d5d6
server/agent/bot/get_bot.py
@@ -25,11 +25,15 @@ def get_bot(
25
26
bot = bot_dao.get_bot(input_data.bot_id)
27
28
- if bot.token_id:
+ # 如果是匿名,强行走 free
29
+ if not getattr(user, "anonymous", False):
30
+ llm_token = llm_token_dao.get_llm_token(free=True)
31
+ elif bot.token_id:
32
llm_token = llm_service.get_llm_token(id=bot.token_id)
33
else:
34
llm_token = llm_token_dao.get_llm_token(bot.llm)
35
36
+ print(f"get_bot, bot={bot}, llm_token={llm_token}")
37
return Bot(bot=bot, llm_token=llm_token)
38
39
def get_bot_by_id(bot_id: str) -> Bot:
0 commit comments