posts: 添加关于米哈游AI模型AnuNeko的文章:上手米哈游AI,然后把它逆了!:包含API调用方法和NoneBot2插件实现

This commit is contained in:
二叉树树
2025-12-02 09:30:26 +08:00
parent c3e573793a
commit c3796da2c6
5 changed files with 56 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View File

@@ -0,0 +1,56 @@
---
title: 上手米哈游AI然后把它逆了
published: 2025-12-02T09:11:40
description: AnuNeko是一只会哈气的橘猫...其实不是AnuNeko是由米哈游创始人做的AI大模型会哈气。于是便做个QQBot给群友玩
image: ../assets/images/anuneko.png
tags:
- AnuNeko
- NoneBot2
- AI
draft: false
lang: ""
---
# 这是What
这是橘猫,会哈气(见封面
你可以前往 [AnuNeko](https://anuneko.com/#/chat) 逗猫
# 逆!
okok注意到登陆后的请求头中有 `x-token` 字段
![](../assets/images/anuneko-1.png)
手搓个请求发发,`data` 携带内容
```json
curl --location 'https://anuneko.com/api/v1/msg/会话id/stream' \
--header 'x-token: 账号Token' \
--header 'Content-Type: text/plain' \
--header 'Cookie: 自动拿取' \
--data '{"contents":["test"]}'
```
通了
![](../assets/images/anuneko-2.png)
然后还有一种情况在遇到Pick的时候我们要发送要选择的回复编号
![](../assets/images/anuneko-3.png)
发个如图请求帮橘猫选择
```
curl --location 'https://anuneko.com/api/v1/msg/select-choice' \
--header 'x-token: 你的Token' \
--header 'Content-Type: text/plain' \
--header 'Cookie: 自动拿取' \
--data '{"msg_id":"会话id","choice_idx":0或1}'
```
还有还有,这有个橘猫和黑猫,如何切换一个会话的猫?
```
curl --location 'https://anuneko.com/api/v1/user/select_model' \
--header 'x-token: 你的Token' \
--header 'Content-Type: text/plain' \
--header 'Cookie: 自动拿取' \
--data '{"chat_id":"会话id","model":"Exotic Shorthair或Orange Cat"}'
```
随便写了个适用于NoneBot2的插件玩吧
[AnuNeko_NoneBot2_Plugins/anuneko.py at main · afoim/AnuNeko_NoneBot2_Plugins](https://github.com/afoim/AnuNeko_NoneBot2_Plugins/blob/main/anuneko.py)