-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[New Feature]update fix-tool-input #280
Conversation
wj-Mcat
commented
Jan 10, 2024
- 支持 yaml path 里面没有 operationId 这个字段
- 使用 pydantic 的方式来dump dataclass 派生类
@@ -29,6 +29,19 @@ def __str__(self): | |||
return f"An error occured in stage <{self.stage}>. The error message is {self.message}" | |||
|
|||
|
|||
class ToolError(Exception): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
啥时候应该抛ToolError, 啥时候应该抛RemoteToolError呢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果是 LocalTool 就抛 ToolError,如果是 RemoteTool 就抛 RemoteToolError 了。
from fastapi import FastAPI | ||
from fastapi.openapi.utils import get_openapi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个不行吧,直接把fastapi搞到主import路径上了,没有fastapi这个依赖直接报错了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个调整了。
@@ -241,3 +243,42 @@ async def parse_file_from_response( | |||
"and can not find `Content-Disposition` or `Content-Type` field from response header.", | |||
stage="Output parsing", | |||
) | |||
|
|||
|
|||
def custom_openapi(app: FastAPI): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个函数名字不好,看不出是在干什么
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done