Skip to content

Commit

Permalink
Revert "feat: only install requirements from required python extensio…
Browse files Browse the repository at this point in the history
…ns to sp…" (#452)

This reverts commit c62c6eb.
  • Loading branch information
plutoless authored Dec 1, 2024
1 parent c62c6eb commit df8a106
Show file tree
Hide file tree
Showing 44 changed files with 536 additions and 204 deletions.
1 change: 0 additions & 1 deletion agents/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ ten_packages/extension/azure_tts
ten_packages/extension/agora_sess_ctrl
ten_packages/extension/agora_rtm
ten_packages/extension/py_init_extension_cpp
ten_packages/extension/http_server_python
ten_packages/system/agora_rtc_sdk
ten_packages/system/azure_speech_sdk
ten_packages/system/nlohmann_json
Expand Down
45 changes: 0 additions & 45 deletions agents/examples/demo/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,51 +37,6 @@
"type": "extension",
"name": "agora_rtm",
"version": "=0.3.0"
},
{
"type": "extension",
"name": "openai_chatgpt_python",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "openai_v2v_python",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "fish_audio_tts",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "message_collector",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "message_collector_rtm",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "vision_tool_python",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "vision_analyze_tool_python",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "weatherapi_tool_python",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "bingsearch_tool_python",
"version": "=0.1.0"
}
]
}
135 changes: 0 additions & 135 deletions agents/examples/experimental/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,141 +37,6 @@
"type": "extension",
"name": "agora_rtm",
"version": "=0.3.0"
},
{
"type": "extension",
"name": "http_server_python",
"version": "0.7.0"
},
{
"type": "extension",
"name": "aliyun_analyticdb_vector_storage",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "aliyun_text_embedding",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "file_chunker",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "llama_index_chat_engine",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "bedrock_llm_python",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "bingsearch_tool_python",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "cartesia_tts",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "cosy_tts_python",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "deepgram_asr_python",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "elevenlabs_tts_python",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "fashionai",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "fish_audio_tts",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "gemini_llm_python",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "gemini_llm_python",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "interrupt_detector_python",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "message_collector",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "minimax_tts_python",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "minimax_v2v_python",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "openai_chatgpt_python",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "openai_v2v_python",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "polly_tts",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "qwen_llm_python",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "transcribe_asr_python",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "tsdb_firestore",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "vision_tool_python",
"version": "=0.1.0"
},
{
"type": "extension",
"name": "weatherapi_tool_python",
"version": "=0.1.0"
}
]
}
10 changes: 5 additions & 5 deletions agents/scripts/install_deps_and_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,7 @@ install_python_requirements() {
if [[ -d "ten_packages/extension" ]]; then
for extension in ten_packages/extension/*; do
if [[ -f "$extension/requirements.txt" ]]; then
local extension_name=$(basename $extension)
local exists_in_manifest=$(cat manifest.json | jq --arg ext_name "${extension_name}" 'any(.dependencies[].name == $ext_name ; .)' )
if [[ "$exists_in_manifest" == "true" ]]; then
pip install -r $extension/requirements.txt
fi
pip install -r $extension/requirements.txt
fi
done
fi
Expand All @@ -77,6 +73,10 @@ install_python_requirements() {
fi
done
fi

# pre-import llama-index as it cloud download additional resources during the first import
echo "pre-import python modules..."
python3.10 -c "import llama_index.core;"
}

build_go_app() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "extension",
"name": "aliyun_analyticdb_vector_storage",
"version": "0.1.0",
"version": "0.4.0",
"dependencies": [
{
"type": "system",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "extension",
"name": "aliyun_text_embedding",
"version": "0.1.0",
"version": "0.4.0",
"dependencies": [
{
"type": "system",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "extension",
"name": "bedrock_llm_python",
"version": "0.1.0",
"version": "0.4.0",
"dependencies": [
{
"type": "system",
Expand Down
21 changes: 21 additions & 0 deletions agents/ten_packages/extension/bingsearch_tool_python/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#
#
# Agora Real Time Engagement
# Created by Wei Hu in 2022-11.
# Copyright (c) 2024 Agora IO. All rights reserved.
#
#
import("//build/feature/ten_package.gni")

ten_package("bingsearch_tool_python") {
package_kind = "extension"

resources = [
"__init__.py",
"addon.py",
"extension.py",
"log.py",
"manifest.json",
"property.json",
]
}
19 changes: 19 additions & 0 deletions agents/ten_packages/extension/cartesia_tts/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#
# This file is part of TEN Framework, an open source project.
# Licensed under the Apache License, Version 2.0.
# See the LICENSE file for more information.
#
import("//build/feature/ten_package.gni")

ten_package("cartesia_tts") {
package_kind = "extension"

resources = [
"__init__.py",
"addon.py",
"extension.py",
"manifest.json",
"property.json",
"tests",
]
}
2 changes: 1 addition & 1 deletion agents/ten_packages/extension/cartesia_tts/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "extension",
"name": "cartesia_tts",
"version": "0.1.0",
"version": "0.4.2",
"dependencies": [
{
"type": "system",
Expand Down
19 changes: 19 additions & 0 deletions agents/ten_packages/extension/cosy_tts_python/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#
# This file is part of TEN Framework, an open source project.
# Licensed under the Apache License, Version 2.0.
# See the LICENSE file for more information.
#
import("//build/feature/ten_package.gni")

ten_package("cosy_tts_python") {
package_kind = "extension"

resources = [
"__init__.py",
"addon.py",
"extension.py",
"manifest.json",
"property.json",
"tests",
]
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "extension",
"name": "cosy_tts_python",
"version": "0.1.0",
"version": "0.4.2",
"dependencies": [
{
"type": "system",
Expand Down
19 changes: 19 additions & 0 deletions agents/ten_packages/extension/elevenlabs_tts_python/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#
# This file is part of TEN Framework, an open source project.
# Licensed under the Apache License, Version 2.0.
# See the LICENSE file for more information.
#
import("//build/feature/ten_package.gni")

ten_package("elevenlabs_tts_python") {
package_kind = "extension"

resources = [
"__init__.py",
"addon.py",
"extension.py",
"manifest.json",
"property.json",
"tests",
]
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "extension",
"name": "elevenlabs_tts_python",
"version": "0.1.0",
"version": "0.4.2",
"dependencies": [
{
"type": "system",
Expand Down
22 changes: 22 additions & 0 deletions agents/ten_packages/extension/fashionai/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#
#
# Agora Real Time Engagement
# Created by Wei Hu in 2022-11.
# Copyright (c) 2024 Agora IO. All rights reserved.
#
#
import("//build/feature/ten_package.gni")

ten_package("fashionai") {
package_kind = "extension"

resources = [
"__init__.py",
"manifest.json",
"property.json",
"src/__init__.py",
"src/addon.py",
"src/extension.py",
"src/log.py",
]
}
2 changes: 1 addition & 1 deletion agents/ten_packages/extension/file_chunker/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "extension",
"name": "file_chunker",
"version": "0.1.0",
"version": "0.4.0",
"dependencies": [
{
"type": "system",
Expand Down
Loading

0 comments on commit df8a106

Please sign in to comment.