Skip to content

Commit

Permalink
deploy: 7befaf8
Browse files Browse the repository at this point in the history
  • Loading branch information
DavdGao committed Oct 28, 2024
1 parent 22af89a commit 6ebc71e
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 2 deletions.
Binary file modified en/.doctrees/environment.pickle
Binary file not shown.
Binary file modified en/.doctrees/index.doctree
Binary file not shown.
4 changes: 3 additions & 1 deletion en/_modules/agentscope/parsers/json_object_parser.html
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,9 @@ <h1>Source code for agentscope.parsers.json_object_parser</h1><div class="highli
<span class="c1"># Requirement checking by Pydantic</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">pydantic_class</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">response</span><span class="o">.</span><span class="n">parsed</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">pydantic_class</span><span class="p">(</span><span class="o">**</span><span class="n">response</span><span class="o">.</span><span class="n">parsed</span><span class="p">))</span>
<span class="n">response</span><span class="o">.</span><span class="n">parsed</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">pydantic_class</span><span class="p">(</span>
<span class="o">**</span><span class="n">response</span><span class="o">.</span><span class="n">parsed</span><span class="p">,</span>
<span class="p">)</span><span class="o">.</span><span class="n">model_dump</span><span class="p">()</span>
<span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="k">raise</span> <span class="n">JsonParsingError</span><span class="p">(</span>
<span class="n">message</span><span class="o">=</span><span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">),</span>
Expand Down
Binary file modified zh_CN/.doctrees/environment.pickle
Binary file not shown.
Binary file modified zh_CN/.doctrees/index.doctree
Binary file not shown.
4 changes: 3 additions & 1 deletion zh_CN/_modules/agentscope/parsers/json_object_parser.html
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,9 @@ <h1>agentscope.parsers.json_object_parser 源代码</h1><div class="highlight"><
<span class="c1"># Requirement checking by Pydantic</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">pydantic_class</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">response</span><span class="o">.</span><span class="n">parsed</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">pydantic_class</span><span class="p">(</span><span class="o">**</span><span class="n">response</span><span class="o">.</span><span class="n">parsed</span><span class="p">))</span>
<span class="n">response</span><span class="o">.</span><span class="n">parsed</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">pydantic_class</span><span class="p">(</span>
<span class="o">**</span><span class="n">response</span><span class="o">.</span><span class="n">parsed</span><span class="p">,</span>
<span class="p">)</span><span class="o">.</span><span class="n">model_dump</span><span class="p">()</span>
<span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="k">raise</span> <span class="n">JsonParsingError</span><span class="p">(</span>
<span class="n">message</span><span class="o">=</span><span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">),</span>
Expand Down

0 comments on commit 6ebc71e

Please sign in to comment.