Skip to content
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

docs: updating default async python to hello world tutorial #223

Merged
merged 5 commits into from
Nov 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 20 additions & 8 deletions docs/ten_agent/create_a_hello_world_extension.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ By running the following commands, an extension called `hello_world` will be cre
{% tab title="Python" %}
<pre class="language-bash" data-title=">_ Bash" data-overflow="wrap"><code class="lang-bash">cd agents

<strong>tman install extension default_extension_python --template-mode --template-data package_name=hello_world --template-data class_name_prefix=HelloWorld
<strong>tman install extension default_async_extension_python --template-mode --template-data package_name=hello_world --template-data class_name_prefix=HelloWorld
</strong>
</code></pre>
{% endtab %}
Expand All @@ -111,9 +111,11 @@ By running the following commands, an extension called `hello_world` will be cre
After running the command, the log will display something like this:

<pre class="language-bash" data-title=">_ Bash"><code class="lang-bash">...
Resolving packages...
<strong>:-) Install successfully in xxx seconds
</strong>...
Creating manifest-lock.json...
+ Installing packages...
<strong>[00:00:01] [########################################] 11/11 Done</strong>
<strong>:-) Install successfully in 20 seconds</strong>
...
</code></pre>

## 4. Adding API to the extension
Expand All @@ -123,15 +125,25 @@ Navigate into the `hello_world` directory and open manifest.json. Add the API ob
<pre class="language-json" data-title="./hello_world/manifest.json"><code class="lang-json">{
"type": "extension",
"name": "hello_world",
"version": "0.4.1",
"language": "python",
"version": "0.3.1",
"dependencies": [
{
"type": "system",
"name": "rte_runtime_python",
"version": "0.4.1"
"name": "ten_runtime_python",
"version": "0.3.1"
}
],
"package": {
"include": [
"manifest.json",
"property.json",
"BUILD.gn",
"**.tent",
"**.py",
"README.md",
"tests/**"
]
},
"api": {
<strong> "data_in": [
</strong><strong> {
Expand Down