1. 自定义api工具模块
llmops
  • app应用模块
    • agent应用模块
      • 查询应用列表
      • 删除agent应用
      • 更新信息
      • 复制agent应用
      • 内置应用分类列表信息
      • 内置应用列表信息
      • 将指定的内置应用添加到个人空间
    • 基础聊天接口
      POST
    • 创建app
      POST
    • 获取app详情/状态
      GET
    • 更新app
      POST
    • 删除app
      DELETE
    • 获取应用配置
      GET
    • 更新app草稿配置
      POST
    • 发布应用
      POST
    • 取消发布应用
      POST
    • 回退到指定的历史草稿
      POST
    • 获取指定应用的发布历史记录
      GET
    • 获取app的长期记忆
      GET
    • 更新长期记忆
      POST
    • 删除长期记忆
      POST
    • 调试对话
      POST
    • 清空应用会话记录
      POST
    • 停止流式输出
      POST
    • 获取应用的调试会话列表
      GET
    • ai优化prompt
      POST
    • 根据消息ID获取建议问题列表
      POST
  • 内置工具模块
    • 获取所有内置工具信息
      GET
    • 获取指定工具信息
      GET
    • 获取提供者的图标
      GET
    • 获取分类信息
      GET
  • 自定义api工具模块
    • 校验openapi-schema格式
      POST
    • 创建自定义api工具
      POST
    • 获取api提供者信息 根据uuid
      GET
    • 获取指定API工具详情
      GET
    • 查询分页
      GET
    • 更新apiprovider
      POST
  • 上传文件模块
    • 上传文件
    • 上传图片
  • 知识库/文档 模块
    • 知识库
      • 创建知识库
      • 获取知识库详情
      • 更新知识库
      • 分页搜索知识库
      • 知识库最近查询列表
    • 文档
      • 指定知识库下新增文档
      • 修改文档名称
      • 获取指定文档基础信息
      • 获取知识库下的文档列表
      • 删除指定文档
    • 片段
      • 获取文档的片段列表
      • 获取片段详情
      • 更新片段启用禁用
      • 新增文档片段
      • 更新片段
      • 删除片段
    • 知识库召回测试
    • 根据批处理id 获取进度
    • 结巴分词/embedding 测试
  • 授权认证
    • 获取指定第三方授权服务重定向地址
    • 获取授权code
    • 指定第三方授权服务的授权地址
  • 工作流模块
  • 帐号模块
    • 获取当前帐号信息
    • 修改账户密码
    • 修改帐号名称
    • 修改头像
    • 帐号密码登录
    • 退出登录
  • 开放API模块
    • 新增apikey
    • 删除key
    • 修改apikey
    • 启用禁用
    • 获取列表
    • 开放chat接口
    • 开放聊天接口
  • 模型模块
    • 获取模型列表
    • 获取icon
    • 获取指定模型详情
  • 辅助agent
  • 测试接口
    GET
  • 有道翻译接口
    GET
  1. 自定义api工具模块

校验openapi-schema格式

开发中
POST
/api-tools/validate-openapi-schema

请求参数

Header 参数

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://localhost:5000/api-tools/validate-openapi-schema' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxZTc1NzIxYi04OTY5LTRkNTktOGM2Ny00ZDZlNTc0Zjk1ODQiLCJpc3MiOiJsbG1vcHMiLCJleHAiOjE3ODM5Mjg2NjZ9.110v8Tvu0kC0i-bx0RTDqcQNU0fFqiwuzo-O2ofgsF8'

返回响应

🟢200成功
application/json
Bodyapplication/json

示例
<!doctype html>
<html lang=en>
  <head>
    <title>TypeError: ApiToolHandler.validate_openapi_schema() missing 1 required positional argument: &#39;openapi_schema&#39;
 // Werkzeug Debugger</title>
    <link rel="stylesheet" href="?__debugger__=yes&amp;cmd=resource&amp;f=style.css">
    <link rel="shortcut icon"
        href="?__debugger__=yes&amp;cmd=resource&amp;f=console.png">
    <script src="?__debugger__=yes&amp;cmd=resource&amp;f=debugger.js"></script>
    <script>
      var CONSOLE_MODE = false,
          EVALEX = true,
          EVALEX_TRUSTED = false,
          SECRET = "iz0zp0oFtvWMh7t8efvR";
    </script>
  </head>
  <body style="background-color: #fff">
    <div class="debugger">
<h1>TypeError</h1>
<div class="detail">
  <p class="errormsg">TypeError: ApiToolHandler.validate_openapi_schema() missing 1 required positional argument: &#39;openapi_schema&#39;
</p>
</div>
<h2 class="traceback">Traceback <em>(most recent call last)</em></h2>
<div class="traceback">
  <h3></h3>
  <ul><li><div class="frame" id="frame-1357968005520">
  <h4>File <cite class="filename">"D:\code\llm-ops\llmops-api\.venv\Lib\site-packages\flask\app.py"</cite>,
      line <em class="line">1536</em>,
      in <code class="function">__call__</code></h4>
  <div class="source library"><pre class="line before"><span class="ws">    </span>) -&gt; cabc.Iterable[bytes]:</pre>
<pre class="line before"><span class="ws">        </span>&#34;&#34;&#34;The WSGI server calls the Flask application object as the</pre>
<pre class="line before"><span class="ws">        </span>WSGI application. This calls :meth:`wsgi_app`, which can be</pre>
<pre class="line before"><span class="ws">        </span>wrapped to apply middleware.</pre>
<pre class="line before"><span class="ws">        </span>&#34;&#34;&#34;</pre>
<pre class="line current"><span class="ws">        </span>return self.wsgi_app(environ, start_response)
<span class="ws">        </span>       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</pre></div>
</div>

<li><div class="frame" id="frame-1357968006528">
  <h4>File <cite class="filename">"D:\code\llm-ops\llmops-api\.venv\Lib\site-packages\flask\app.py"</cite>,
      line <em class="line">1514</em>,
      in <code class="function">wsgi_app</code></h4>
  <div class="source library"><pre class="line before"><span class="ws">            </span>try:</pre>
<pre class="line before"><span class="ws">                </span>ctx.push()</pre>
<pre class="line before"><span class="ws">                </span>response = self.full_dispatch_request()</pre>
<pre class="line before"><span class="ws">            </span>except Exception as e:</pre>
<pre class="line before"><span class="ws">                </span>error = e</pre>
<pre class="line current"><span class="ws">                </span>response = self.handle_exception(e)
<span class="ws">                </span>           ^^^^^^^^^^^^^^^^^^^^^^^^</pre>
<pre class="line after"><span class="ws">            </span>except:  # noqa: B001</pre>
<pre class="line after"><span class="ws">                </span>error = sys.exc_info()[1]</pre>
<pre class="line after"><span class="ws">                </span>raise</pre>
<pre class="line after"><span class="ws">            </span>return response(environ, start_response)</pre>
<pre class="line after"><span class="ws">        </span>finally:</pre></div>
</div>

<li><div class="frame" id="frame-1357968006672">
  <h4>File <cite class="filename">"D:\code\llm-ops\llmops-api\.venv\Lib\site-packages\flask\app.py"</cite>,
      line <em class="line">1511</em>,
      in <code class="function">wsgi_app</code></h4>
  <div class="source library"><pre class="line before"><span class="ws">        </span>ctx = self.request_context(environ)</pre>
<pre class="line before"><span class="ws">        </span>error: BaseException | None = None</pre>
<pre class="line before"><span class="ws">        </span>try:</pre>
<pre class="line before"><span class="ws">            </span>try:</pre>
<pre class="line before"><span class="ws">                </span>ctx.push()</pre>
<pre class="line current"><span class="ws">                </span>response = self.full_dispatch_request()
<span class="ws">                </span>           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^</pre>
<pre class="line after"><span class="ws">            </span>except Exception as e:</pre>
<pre class="line after"><span class="ws">                </span>error = e</pre>
<pre class="line after"><span class="ws">                </span>response = self.handle_exception(e)</pre>
<pre class="line after"><span class="ws">            </span>except:  # noqa: B001</pre>
<pre class="line after"><span class="ws">                </span>error = sys.exc_info()[1]</pre></div>
</div>

<li><div class="frame" id="frame-1357968002064">
  <h4>File <cite class="filename">"D:\code\llm-ops\llmops-api\.venv\Lib\site-packages\flask\app.py"</cite>,
      line <em class="line">919</em>,
      in <code class="function">full_dispatch_request</code></h4>
  <div class="source library"><pre class="line before"><span class="ws">            </span>request_started.send(self, _async_wrapper=self.ensure_sync)</pre>
<pre class="line before"><span class="ws">            </span>rv = self.preprocess_request()</pre>
<pre class="line before"><span class="ws">            </span>if rv is None:</pre>
<pre class="line before"><span class="ws">                </span>rv = self.dispatch_request()</pre>
<pre class="line before"><span class="ws">        </span>except Exception as e:</pre>
<pre class="line current"><span class="ws">            </span>rv = self.handle_user_exception(e)
<span class="ws">            </span>     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</pre>
<pre class="line after"><span class="ws">        </span>return self.finalize_request(rv)</pre>
<pre class="line after"><span class="ws"></span> </pre>
<pre class="line after"><span class="ws">    </span>def finalize_request(</pre>
<pre class="line after"><span class="ws">        </span>self,</pre>
<pre class="line after"><span class="ws">        </span>rv: ft.ResponseReturnValue | HTTPException,</pre></div>
</div>

<li><div class="frame" id="frame-1357968002352">
  <h4>File <cite class="filename">"D:\code\llm-ops\llmops-api\.venv\Lib\site-packages\flask\app.py"</cite>,
      line <em class="line">809</em>,
      in <code class="function">handle_user_exception</code></h4>
  <div class="source library"><pre class="line before"><span class="ws">        </span>handler = self._find_error_handler(e, request.blueprints)</pre>
<pre class="line before"><span class="ws"></span> </pre>
<pre class="line before"><span class="ws">        </span>if handler is None:</pre>
<pre class="line before"><span class="ws">            </span>raise</pre>
<pre class="line before"><span class="ws"></span> </pre>
<pre class="line current"><span class="ws">        </span>return self.ensure_sync(handler)(e)  # type: ignore[no-any-return]
<span class="ws">        </span>       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^</pre>
<pre class="line after"><span class="ws"></span> </pre>
<pre class="line after"><span class="ws">    </span>def handle_exception(self, e: Exception) -&gt; Response:</pre>
<pre class="line after"><span class="ws">        </span>&#34;&#34;&#34;Handle an exception that did not have an error handler</pre>
<pre class="line after"><span class="ws">        </span>associated with it, or that was raised from an error handler.</pre>
<pre class="line after"><span class="ws">        </span>This always causes a 500 ``InternalServerError``.</pre></div>
</div>

<li><div class="frame" id="frame-1357968005376">
  <h4>File <cite class="filename">"D:\code\llm-ops\llmops-api\internal\server\http.py"</cite>,
      line <em class="line">72</em>,
      in <code class="function">_register_error_handler</code></h4>
  <div class="source "><pre class="line before"><span class="ws">                </span>code=error.code,</pre>
<pre class="line before"><span class="ws">                </span>message=error.message,</pre>
<pre class="line before"><span class="ws">                </span>data=error.data if error.data is not None else {}</pre>
<pre class="line before"><span class="ws">            </span>))</pre>
<pre class="line before"><span class="ws">        </span>if self.debug or os.getenv(&#34;FLASK_ENV&#34;) == &#34;development&#34;:</pre>
<pre class="line current"><span class="ws">            </span>raise error
<span class="ws">            </span>^^^^^^^^^^^</pre>
<pre class="line after"><span class="ws">        </span>else:</pre>
<pre class="line after"><span class="ws">            </span>return json(Response(</pre>
<pre class="line after"><span class="ws">                </span>code=HttpCode.FAIL,</pre>
<pre class="line after"><span class="ws">                </span>message=str(error),</pre>
<pre class="line after"><span class="ws">                </span>data={}</pre></div>
</div>

<li><div class="frame" id="frame-1357968005088">
  <h4>File <cite class="filename">"D:\code\llm-ops\llmops-api\.venv\Lib\site-packages\flask\app.py"</cite>,
      line <em class="line">917</em>,
      in <code class="function">full_dispatch_request</code></h4>
  <div class="source library"><pre class="line before"><span class="ws"></span> </pre>
<pre class="line before"><span class="ws">        </span>try:</pre>
<pre class="line before"><span class="ws">            </span>request_started.send(self, _async_wrapper=self.ensure_sync)</pre>
<pre class="line before"><span class="ws">            </span>rv = self.preprocess_request()</pre>
<pre class="line before"><span class="ws">            </span>if rv is None:</pre>
<pre class="line current"><span class="ws">                </span>rv = self.dispatch_request()
<span class="ws">                </span>     ^^^^^^^^^^^^^^^^^^^^^^^</pre>
<pre class="line after"><span class="ws">        </span>except Exception as e:</pre>
<pre class="line after"><span class="ws">            </span>rv = self.handle_user_exception(e)</pre>
<pre class="line after"><span class="ws">        </span>return self.finalize_request(rv)</pre>
<pre class="line after"><span class="ws"></span> </pre>
<pre class="line after"><span class="ws">    </span>def finalize_request(</pre></div>
</div>

<li><div class="frame" id="frame-1357968003792">
  <h4>File <cite class="filename">"D:\code\llm-ops\llmops-api\.venv\Lib\site-packages\flask\app.py"</cite>,
      line <em class="line">902</em>,
      in <code class="function">dispatch_request</code></h4>
  <div class="source library"><pre class="line before"><span class="ws">            </span>and req.method == &#34;OPTIONS&#34;</pre>
<pre class="line before"><span class="ws">        </span>):</pre>
<pre class="line before"><span class="ws">            </span>return self.make_default_options_response()</pre>
<pre class="line before"><span class="ws">        </span># otherwise dispatch to the handler for that endpoint</pre>
<pre class="line before"><span class="ws">        </span>view_args: dict[str, t.Any] = req.view_args  # type: ignore[assignment]</pre>
<pre class="line current"><span class="ws">        </span>return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
<span class="ws">        </span>       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</pre>
<pre class="line after"><span class="ws"></span> </pre>
<pre class="line after"><span class="ws">    </span>def full_dispatch_request(self) -&gt; Response:</pre>
<pre class="line after"><span class="ws">        </span>&#34;&#34;&#34;Dispatches the request and on top of that performs request</pre>
<pre class="line after"><span class="ws">        </span>pre and postprocessing as well as HTTP exception catching and</pre>
<pre class="line after"><span class="ws">        </span>error handling.</pre></div>
</div>
</ul>
  <blockquote>TypeError: ApiToolHandler.validate_openapi_schema() missing 1 required positional argument: &#39;openapi_schema&#39;
</blockquote>
</div>

<div class="plain">
    <p>
      This is the Copy/Paste friendly version of the traceback.
    </p>
    <textarea cols="50" rows="10" name="code" readonly>Traceback (most recent call last):
  File &#34;D:\code\llm-ops\llmops-api\.venv\Lib\site-packages\flask\app.py&#34;, line 1536, in __call__
    return self.wsgi_app(environ, start_response)
           ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File &#34;D:\code\llm-ops\llmops-api\.venv\Lib\site-packages\flask\app.py&#34;, line 1514, in wsgi_app
    response = self.handle_exception(e)
  File &#34;D:\code\llm-ops\llmops-api\.venv\Lib\site-packages\flask\app.py&#34;, line 1511, in wsgi_app
    response = self.full_dispatch_request()
  File &#34;D:\code\llm-ops\llmops-api\.venv\Lib\site-packages\flask\app.py&#34;, line 919, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File &#34;D:\code\llm-ops\llmops-api\.venv\Lib\site-packages\flask\app.py&#34;, line 809, in handle_user_exception
    return self.ensure_sync(handler)(e)  # type: ignore[no-any-return]
           ~~~~~~~~~~~~~~~~~~~~~~~~~^^^
  File &#34;D:\code\llm-ops\llmops-api\internal\server\http.py&#34;, line 72, in _register_error_handler
    raise error
  File &#34;D:\code\llm-ops\llmops-api\.venv\Lib\site-packages\flask\app.py&#34;, line 917, in full_dispatch_request
    rv = self.dispatch_request()
  File &#34;D:\code\llm-ops\llmops-api\.venv\Lib\site-packages\flask\app.py&#34;, line 902, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
TypeError: ApiToolHandler.validate_openapi_schema() missing 1 required positional argument: &#39;openapi_schema&#39;
</textarea>
</div>
<div class="explanation">
  The debugger caught an exception in your WSGI application.  You can now
  look at the traceback which led to the error.  <span class="nojavascript">
  If you enable JavaScript you can also use additional features such as code
  execution (if the evalex feature is enabled), automatic pasting of the
  exceptions and much more.</span>
</div>
      <div class="footer">
        Brought to you by <strong class="arthur">DON'T PANIC</strong>, your
        friendly Werkzeug powered traceback interpreter.
      </div>
    </div>

    <div class="pin-prompt">
      <div class="inner">
        <h3>Console Locked</h3>
        <p>
          The console is locked and needs to be unlocked by entering the PIN.
          You can find the PIN printed out on the standard output of your
          shell that runs the server.
        <form>
          <p>PIN:
            <input type=text name=pin size=14>
            <input type=submit name=btn value="Confirm Pin">
        </form>
      </div>
    </div>
  </body>
</html>

<!--

Traceback (most recent call last):
  File "D:\code\llm-ops\llmops-api\.venv\Lib\site-packages\flask\app.py", line 1536, in __call__
    return self.wsgi_app(environ, start_response)
           ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\code\llm-ops\llmops-api\.venv\Lib\site-packages\flask\app.py", line 1514, in wsgi_app
    response = self.handle_exception(e)
  File "D:\code\llm-ops\llmops-api\.venv\Lib\site-packages\flask\app.py", line 1511, in wsgi_app
    response = self.full_dispatch_request()
  File "D:\code\llm-ops\llmops-api\.venv\Lib\site-packages\flask\app.py", line 919, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "D:\code\llm-ops\llmops-api\.venv\Lib\site-packages\flask\app.py", line 809, in handle_user_exception
    return self.ensure_sync(handler)(e)  # type: ignore[no-any-return]
           ~~~~~~~~~~~~~~~~~~~~~~~~~^^^
  File "D:\code\llm-ops\llmops-api\internal\server\http.py", line 72, in _register_error_handler
    raise error
  File "D:\code\llm-ops\llmops-api\.venv\Lib\site-packages\flask\app.py", line 917, in full_dispatch_request
    rv = self.dispatch_request()
  File "D:\code\llm-ops\llmops-api\.venv\Lib\site-packages\flask\app.py", line 902, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
TypeError: ApiToolHandler.validate_openapi_schema() missing 1 required positional argument: 'openapi_schema'


-->
修改于 2026-04-09 10:53:27
上一页
获取分类信息
下一页
创建自定义api工具
Built with