MCPcopy
hub / github.com/AstrBotDevs/AstrBot / insert

Method insert

astrbot/core/db/vec_db/base.py:16–23  ·  view source on GitHub ↗

插入一条文本和其对应向量,自动生成 ID 并保持一致性。

(
        self,
        content: str,
        metadata: dict | None = None,
        id: str | None = None,
    )

Source from the content-addressed store, hash-verified

14
15 @abc.abstractmethod
16 async def insert(
17 self,
18 content: str,
19 metadata: dict | None = None,
20 id: str | None = None,
21 ) -> int:
22 """插入一条文本和其对应向量,自动生成 ID 并保持一致性。"""
23 ...
24
25 @abc.abstractmethod
26 async def insert_batch(

Callers 15

check_envFunction · 0.45
completion_textMethod · 0.45
_prepare_payloadMethod · 0.45
text_chatMethod · 0.45
text_chat_streamMethod · 0.45
_prepare_chat_payloadMethod · 0.45
text_chatMethod · 0.45
text_chat_streamMethod · 0.45
processMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected