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-19 06:11:28 +00:00
|
|
|
async def command_botinfo(room: MatrixRoom, event: RoomMessageText, context: dict):
|
|
|
|
logging("Showing bot info...")
|
|
|
|
|
2023-04-23 13:26:46 +00:00
|
|
|
return room.room_id, "m.room.message", {"msgtype": "m.notice",
|
|
|
|
"body": f"""GPT Info:
|
2023-04-19 06:11:28 +00:00
|
|
|
|
|
|
|
Model: {context["model"]}
|
|
|
|
Maximum context tokens: {context["max_tokens"]}
|
|
|
|
Maximum context messages: {context["max_messages"]}
|
|
|
|
System message: {context["system_message"]}
|
|
|
|
|
|
|
|
Room info:
|
|
|
|
|
|
|
|
Bot user ID: {context["client"].user_id}
|
|
|
|
Current room ID: {room.room_id}
|
|
|
|
|
|
|
|
For usage statistics, run !gptbot stats
|
2023-04-23 13:26:46 +00:00
|
|
|
"""}
|