Add Langchain Agent wrapper with OpenAI Function / Self-ask agent support (#82)
* update Param() type hint in MVP * update default embedding endpoint * update Langchain agent wrapper * update langchain agent
This commit is contained in:
committed by
GitHub
parent
0a3fc4b228
commit
8bb7ad91e0
@@ -1,12 +1,12 @@
|
||||
from .base import AgentOutput
|
||||
from ...base import Document
|
||||
|
||||
|
||||
def get_plugin_response_content(output) -> str:
|
||||
"""
|
||||
Wrapper for AgentOutput content return
|
||||
"""
|
||||
if isinstance(output, AgentOutput):
|
||||
return output.output
|
||||
if isinstance(output, Document):
|
||||
return output.text
|
||||
else:
|
||||
return str(output)
|
||||
|
||||
|
Reference in New Issue
Block a user