Skip to content

Commit

Permalink
deploy: 3918f07
Browse files Browse the repository at this point in the history
  • Loading branch information
pan-x-c committed Nov 20, 2024
1 parent a3e475d commit 7f1bcf5
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 32 deletions.
Binary file modified en/.doctrees/environment.pickle
Binary file not shown.
Binary file modified en/.doctrees/index.doctree
Binary file not shown.
7 changes: 4 additions & 3 deletions en/_modules/agentscope/logging.html
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ <h1>Source code for agentscope.logging</h1><div class="highlight"><pre>
<span class="k">if</span> <span class="n">record</span><span class="p">[</span><span class="s2">&quot;level&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">name</span> <span class="o">==</span> <span class="n">LEVEL_SAVE_LOG</span><span class="p">:</span>
<span class="k">return</span> <span class="s2">&quot;</span><span class="si">{message}</span><span class="se">\n</span><span class="s2">&quot;</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">return</span> <span class="n">_DEFAULT_LOG_FORMAT</span>
<span class="k">return</span> <span class="n">_DEFAULT_LOG_FORMAT</span> <span class="o">+</span> <span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span>


<div class="viewcode-block" id="setup_logger">
Expand All @@ -324,6 +324,9 @@ <h1>Source code for agentscope.logging</h1><div class="highlight"><pre>
<span class="sd"> `&quot;DEBUG&quot;`, `&quot;INFO&quot;`, `&quot;SUCCESS&quot;`, `&quot;WARNING&quot;`, `&quot;ERROR&quot;`,</span>
<span class="sd"> `&quot;CRITICAL&quot;`.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="c1"># set logging level</span>
<span class="n">logger</span><span class="o">.</span><span class="n">remove</span><span class="p">()</span>

<span class="c1"># avoid reinit in subprocess</span>
<span class="k">if</span> <span class="ow">not</span> <span class="nb">hasattr</span><span class="p">(</span><span class="n">logger</span><span class="p">,</span> <span class="s2">&quot;chat&quot;</span><span class="p">):</span>
<span class="c1"># add chat function for logger</span>
Expand All @@ -333,8 +336,6 @@ <h1>Source code for agentscope.logging</h1><div class="highlight"><pre>
<span class="n">logger</span><span class="o">.</span><span class="n">level</span><span class="p">(</span><span class="n">LEVEL_SAVE_MSG</span><span class="p">,</span> <span class="n">no</span><span class="o">=</span><span class="mi">53</span><span class="p">)</span>
<span class="n">logger</span><span class="o">.</span><span class="n">chat</span> <span class="o">=</span> <span class="n">log_msg</span>

<span class="c1"># set logging level</span>
<span class="n">logger</span><span class="o">.</span><span class="n">remove</span><span class="p">()</span>
<span class="c1"># standard output for all logging except chat</span>
<span class="n">logger</span><span class="o">.</span><span class="n">add</span><span class="p">(</span>
<span class="n">sys</span><span class="o">.</span><span class="n">stdout</span><span class="p">,</span>
Expand Down
22 changes: 12 additions & 10 deletions en/_modules/agentscope/service/service_toolkit.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@
<h1>Source code for agentscope.service.service_toolkit</h1><div class="highlight"><pre>
<span></span># -*- coding: utf-8 -*-
&quot;&quot;&quot;Service Toolkit for service function usage.&quot;&quot;&quot;
import collections.abc
import json
from functools import partial
import inspect
Expand Down Expand Up @@ -162,7 +161,10 @@ <h1>Source code for agentscope.service.service_toolkit</h1><div class="highlight
# Typing class
if cls.__origin__ is Union:
type_str = [_get_type_str(_) for _ in get_args(cls)]
elif cls.__origin__ is collections.abc.Sequence:
clean_type_str = [_ for _ in type_str if _ != &quot;null&quot;]
if len(clean_type_str) == 1:
type_str = clean_type_str[0]
elif cls.__origin__ in [list, tuple]:
type_str = &quot;array&quot;
else:
type_str = str(cls.__origin__)
Expand All @@ -174,7 +176,7 @@ <h1>Source code for agentscope.service.service_toolkit</h1><div class="highlight
type_str = &quot;number&quot;
elif cls is bool:
type_str = &quot;boolean&quot;
elif cls is collections.abc.Sequence:
elif cls in [list, tuple]:
type_str = &quot;array&quot;
elif cls is None.__class__:
type_str = &quot;null&quot;
Expand Down Expand Up @@ -652,9 +654,9 @@ <h1>Source code for agentscope.service.service_toolkit</h1><div class="highlight
docstring = parse(service_func.__doc__)

# Function description
func_description = (
docstring.short_description or docstring.long_description
)
short_description = docstring.short_description or &quot;&quot;
long_description = docstring.long_description or &quot;&quot;
func_description = &quot;\n\n&quot;.join([short_description, long_description])

# The arguments that requires the agent to specify
# to support class method, the self args are deprecated
Expand Down Expand Up @@ -719,7 +721,7 @@ <h1>Source code for agentscope.service.service_toolkit</h1><div class="highlight
&quot;type&quot;: &quot;function&quot;,
&quot;function&quot;: {
&quot;name&quot;: service_func.__name__,
&quot;description&quot;: func_description,
&quot;description&quot;: func_description.strip(),
&quot;parameters&quot;: {
&quot;type&quot;: &quot;object&quot;,
&quot;properties&quot;: properties_field,
Expand Down Expand Up @@ -816,9 +818,9 @@ <h1>Source code for agentscope.service.service_toolkit</h1><div class="highlight
docstring = parse(service_func.__doc__)

# Function description
func_description = (
docstring.short_description or docstring.long_description
)
short_description = docstring.short_description or &quot;&quot;
long_description = docstring.long_description or &quot;&quot;
func_description = &quot;\n&quot;.join([short_description, long_description])

# The arguments that requires the agent to specify
# we remove the self argument, for class methods
Expand Down
10 changes: 7 additions & 3 deletions en/_static/js/versions.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
const themeFlyoutDisplay = "hidden";
const themeVersionSelector = "True";
const themeLanguageSelector = "True";
const themeVersionSelector = true;
const themeLanguageSelector = true;

if (themeFlyoutDisplay === "attached") {
function renderLanguages(config) {
if (!config.projects.translations.length) {
return "";
}

// Insert the current language to the options on the selector
let languages = config.projects.translations.concat(config.projects.current);
languages = languages.sort((a, b) => a.language.name.localeCompare(b.language.name));

const languagesHTML = `
<dl>
<dt>Languages</dt>
${config.projects.translations
${languages
.map(
(translation) => `
<dd ${translation.slug == config.projects.current.slug ? 'class="rtd-current-item"' : ""}>
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.
7 changes: 4 additions & 3 deletions zh_CN/_modules/agentscope/logging.html
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ <h1>agentscope.logging 源代码</h1><div class="highlight"><pre>
<span class="k">if</span> <span class="n">record</span><span class="p">[</span><span class="s2">&quot;level&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">name</span> <span class="o">==</span> <span class="n">LEVEL_SAVE_LOG</span><span class="p">:</span>
<span class="k">return</span> <span class="s2">&quot;</span><span class="si">{message}</span><span class="se">\n</span><span class="s2">&quot;</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">return</span> <span class="n">_DEFAULT_LOG_FORMAT</span>
<span class="k">return</span> <span class="n">_DEFAULT_LOG_FORMAT</span> <span class="o">+</span> <span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span>


<div class="viewcode-block" id="setup_logger">
Expand All @@ -328,6 +328,9 @@ <h1>agentscope.logging 源代码</h1><div class="highlight"><pre>
<span class="sd"> `&quot;DEBUG&quot;`, `&quot;INFO&quot;`, `&quot;SUCCESS&quot;`, `&quot;WARNING&quot;`, `&quot;ERROR&quot;`,</span>
<span class="sd"> `&quot;CRITICAL&quot;`.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="c1"># set logging level</span>
<span class="n">logger</span><span class="o">.</span><span class="n">remove</span><span class="p">()</span>

<span class="c1"># avoid reinit in subprocess</span>
<span class="k">if</span> <span class="ow">not</span> <span class="nb">hasattr</span><span class="p">(</span><span class="n">logger</span><span class="p">,</span> <span class="s2">&quot;chat&quot;</span><span class="p">):</span>
<span class="c1"># add chat function for logger</span>
Expand All @@ -337,8 +340,6 @@ <h1>agentscope.logging 源代码</h1><div class="highlight"><pre>
<span class="n">logger</span><span class="o">.</span><span class="n">level</span><span class="p">(</span><span class="n">LEVEL_SAVE_MSG</span><span class="p">,</span> <span class="n">no</span><span class="o">=</span><span class="mi">53</span><span class="p">)</span>
<span class="n">logger</span><span class="o">.</span><span class="n">chat</span> <span class="o">=</span> <span class="n">log_msg</span>

<span class="c1"># set logging level</span>
<span class="n">logger</span><span class="o">.</span><span class="n">remove</span><span class="p">()</span>
<span class="c1"># standard output for all logging except chat</span>
<span class="n">logger</span><span class="o">.</span><span class="n">add</span><span class="p">(</span>
<span class="n">sys</span><span class="o">.</span><span class="n">stdout</span><span class="p">,</span>
Expand Down
22 changes: 12 additions & 10 deletions zh_CN/_modules/agentscope/service/service_toolkit.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@
<h1>agentscope.service.service_toolkit 源代码</h1><div class="highlight"><pre>
<span></span># -*- coding: utf-8 -*-
&quot;&quot;&quot;Service Toolkit for service function usage.&quot;&quot;&quot;
import collections.abc
import json
from functools import partial
import inspect
Expand Down Expand Up @@ -166,7 +165,10 @@ <h1>agentscope.service.service_toolkit 源代码</h1><div class="highlight"><pre
# Typing class
if cls.__origin__ is Union:
type_str = [_get_type_str(_) for _ in get_args(cls)]
elif cls.__origin__ is collections.abc.Sequence:
clean_type_str = [_ for _ in type_str if _ != &quot;null&quot;]
if len(clean_type_str) == 1:
type_str = clean_type_str[0]
elif cls.__origin__ in [list, tuple]:
type_str = &quot;array&quot;
else:
type_str = str(cls.__origin__)
Expand All @@ -178,7 +180,7 @@ <h1>agentscope.service.service_toolkit 源代码</h1><div class="highlight"><pre
type_str = &quot;number&quot;
elif cls is bool:
type_str = &quot;boolean&quot;
elif cls is collections.abc.Sequence:
elif cls in [list, tuple]:
type_str = &quot;array&quot;
elif cls is None.__class__:
type_str = &quot;null&quot;
Expand Down Expand Up @@ -656,9 +658,9 @@ <h1>agentscope.service.service_toolkit 源代码</h1><div class="highlight"><pre
docstring = parse(service_func.__doc__)

# Function description
func_description = (
docstring.short_description or docstring.long_description
)
short_description = docstring.short_description or &quot;&quot;
long_description = docstring.long_description or &quot;&quot;
func_description = &quot;\n\n&quot;.join([short_description, long_description])

# The arguments that requires the agent to specify
# to support class method, the self args are deprecated
Expand Down Expand Up @@ -723,7 +725,7 @@ <h1>agentscope.service.service_toolkit 源代码</h1><div class="highlight"><pre
&quot;type&quot;: &quot;function&quot;,
&quot;function&quot;: {
&quot;name&quot;: service_func.__name__,
&quot;description&quot;: func_description,
&quot;description&quot;: func_description.strip(),
&quot;parameters&quot;: {
&quot;type&quot;: &quot;object&quot;,
&quot;properties&quot;: properties_field,
Expand Down Expand Up @@ -820,9 +822,9 @@ <h1>agentscope.service.service_toolkit 源代码</h1><div class="highlight"><pre
docstring = parse(service_func.__doc__)

# Function description
func_description = (
docstring.short_description or docstring.long_description
)
short_description = docstring.short_description or &quot;&quot;
long_description = docstring.long_description or &quot;&quot;
func_description = &quot;\n&quot;.join([short_description, long_description])

# The arguments that requires the agent to specify
# we remove the self argument, for class methods
Expand Down
10 changes: 7 additions & 3 deletions zh_CN/_static/js/versions.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
const themeFlyoutDisplay = "hidden";
const themeVersionSelector = "True";
const themeLanguageSelector = "True";
const themeVersionSelector = true;
const themeLanguageSelector = true;

if (themeFlyoutDisplay === "attached") {
function renderLanguages(config) {
if (!config.projects.translations.length) {
return "";
}

// Insert the current language to the options on the selector
let languages = config.projects.translations.concat(config.projects.current);
languages = languages.sort((a, b) => a.language.name.localeCompare(b.language.name));

const languagesHTML = `
<dl>
<dt>Languages</dt>
${config.projects.translations
${languages
.map(
(translation) => `
<dd ${translation.slug == config.projects.current.slug ? 'class="rtd-current-item"' : ""}>
Expand Down

0 comments on commit 7f1bcf5

Please sign in to comment.