pangukitsappdev.skill package

Subpackages

Submodules

pangukitsappdev.skill.agent_session_skill module

class pangukitsappdev.skill.agent_session_skill.AgentSessionSkill(llm: LLMApi)

基类:Skill

对Agent的Session进行总结,得出问题的最终答案

execute(session: AgentSession) str

执行Executor :param inputs: 输入的参数,基本上都是用来渲染prompt_template的 :return: 执行结果,LLM的返回结果

summary(session: AgentSession) str

pangukitsappdev.skill.conversation_rewrite_skill module

class pangukitsappdev.skill.conversation_rewrite_skill.ConversationRewriteSkill(llm: LLMApi)

基类:object

rewrite(messages: List[ConversationMessage]) str
set_prompt(prompt_template: str)

pangukitsappdev.skill.conversation_skill module

class pangukitsappdev.skill.conversation_skill.ConversationSkill(llm: LLMApi)

基类:Skill

class PromptParam

基类:object

INPUT = 'input'
MEMORY_HISTORY = 'history'
OUTPUT = 'output'
execute(input_str: str) str

执行Executor :param inputs: 输入的参数,基本上都是用来渲染prompt_template的 :return: 执行结果,LLM的返回结果

execute_dict(inputs: Dict[str, Any]) str
set_memory(memory: BaseMemory)
set_prompt(prompt_template: str)

pangukitsappdev.skill.factory module

class pangukitsappdev.skill.factory.DocumentSkills

基类:object

构造文档相关的Executor

classmethod of(llm_api: LLMApi) DocAskSkill
classmethod of_type(skill_type: str, llm_api: LLMApi) DocAskSkill
prompt_template_map: Dict[str, PromptTemplate] = {}
classmethod register_prompt_template(skill_type, prompt_template: PromptTemplate)

pangukitsappdev.skill.qa_with_sources module

class pangukitsappdev.skill.qa_with_sources.DocAskSkill(llm_api: LLMApi)

基类:SimpleSkill

Module contents