2023-04-19 06:11:28 +00:00
|
|
|
from nio.events.room_events import RoomMessageText
|
|
|
|
from nio.rooms import MatrixRoom
|
|
|
|
|
2023-04-23 13:26:46 +00:00
|
|
|
|
2023-04-25 11:25:53 +00:00
|
|
|
async def command_botinfo(room: MatrixRoom, event: RoomMessageText, bot):
|
2023-04-19 06:11:28 +00:00
|
|
|
logging("Showing bot info...")
|
|
|
|
|
2023-04-25 11:25:53 +00:00
|
|
|
body = f"""GPT Info:
|
2023-04-19 06:11:28 +00:00
|
|
|
|
2023-04-25 11:25:53 +00:00
|
|
|
Model: {bot.model}
|
|
|
|
Maximum context tokens: {bot.max_tokens}
|
|
|
|
Maximum context messages: {bot.max_messages}
|
2023-04-19 06:11:28 +00:00
|
|
|
|
|
|
|
Room info:
|
|
|
|
|
2023-04-25 11:25:53 +00:00
|
|
|
Bot user ID: {bot.matrix_client.user_id}
|
2023-04-19 06:11:28 +00:00
|
|
|
Current room ID: {room.room_id}
|
2023-04-25 11:25:53 +00:00
|
|
|
System message: {bot.get_system_message(room)}
|
2023-04-19 06:11:28 +00:00
|
|
|
|
|
|
|
For usage statistics, run !gptbot stats
|
2023-04-25 11:25:53 +00:00
|
|
|
"""
|
|
|
|
|
|
|
|
await bot.send_message(room, body, True)
|