Files
AstrBot/model/provider/provider.py

35 lines
1016 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
class Provider:
async def text_chat(self,
prompt: str,
session_id: str,
image_url: None,
function_call: None,
extra_conf: dict = None,
default_personality: dict = None,
**kwargs) -> str:
'''
[require]
prompt: 提示词
session_id: 会话id
[optional]
image_url: 图片url识图
function_call: 函数调用
extra_conf: 额外配置
default_personality: 默认人格
'''
raise NotImplementedError
async def image_generate(self, prompt, session_id, **kwargs) -> str:
'''
[require]
prompt: 提示词
session_id: 会话id
'''
raise NotImplementedError
async def forget(self, session_id = None) -> bool:
'''
重置会话
'''
raise NotImplementedError