Roland Ding commited on
Commit ·
37586a3
1
Parent(s): 175ac78
Fix typo in tool schema.
Browse filesAdd translate function to supplier.py (currently inactive)
- supplier.py +13 -0
- tools/__init__.py +1 -1
supplier.py
CHANGED
|
@@ -83,6 +83,19 @@ def run_tool(tool_call):
|
|
| 83 |
|
| 84 |
return result
|
| 85 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
def transcript(file_path):
|
| 87 |
if file_path:
|
| 88 |
f = open(file_path,"rb")
|
|
|
|
| 83 |
|
| 84 |
return result
|
| 85 |
|
| 86 |
+
# def translate(file_path):
|
| 87 |
+
# if file_path:
|
| 88 |
+
# f = open(file_path,"rb")
|
| 89 |
+
# res = OPENAI_CLIENT.audio.translations.create(
|
| 90 |
+
# file=f,
|
| 91 |
+
# model='whisper-1',
|
| 92 |
+
# target_language=App_state["language"]
|
| 93 |
+
# )
|
| 94 |
+
# return res.text
|
| 95 |
+
# else:
|
| 96 |
+
# return ""
|
| 97 |
+
# the translation shall be other language to english directly upon creation.
|
| 98 |
+
|
| 99 |
def transcript(file_path):
|
| 100 |
if file_path:
|
| 101 |
f = open(file_path,"rb")
|
tools/__init__.py
CHANGED
|
@@ -18,6 +18,6 @@ TOOLS = {
|
|
| 18 |
"get_project" :project_manager.get_item,
|
| 19 |
"add_project" :project_manager.add_item,
|
| 20 |
"update_project" :project_manager.update_item,
|
| 21 |
-
"
|
| 22 |
"remove_project" :project_manager.remove_item
|
| 23 |
}
|
|
|
|
| 18 |
"get_project" :project_manager.get_item,
|
| 19 |
"add_project" :project_manager.add_item,
|
| 20 |
"update_project" :project_manager.update_item,
|
| 21 |
+
"summarize_projects" :project_manager.summarize_item,
|
| 22 |
"remove_project" :project_manager.remove_item
|
| 23 |
}
|