Przeglądaj źródła

【修复】包引入异常

PJ568 1 rok temu
rodzic
commit
cb7738fa97

+ 2 - 2
README.en.md

@@ -22,13 +22,13 @@ cd yaa
 Run `yaa` service:
 
 ```bash
-python -m yaa/yaa --serve
+python -m yaa.yaa --serve
 ```
 
 Command line interactive mode:
 
 ```bash
-python -m yaa/yaa
+python -m yaa.yaa
 ```
 
 ## Project Implementation

+ 2 - 2
README.md

@@ -22,13 +22,13 @@ cd yaa
 运行 `yaa` 服务:
 
 ```bash
-python -m yaa/yaa --serve
+python -m yaa.yaa --serve
 ```
 
 命令行交互模式:
 
 ```bash
-python -m yaa/yaa
+python -m yaa.yaa
 ```
 
 ## 项目实现

+ 1 - 1
VERSION

@@ -1 +1 @@
-0.5.0
+0.5.1

+ 4 - 4
yaa/Agent/BaseAgent.py

@@ -1,7 +1,7 @@
-from ..Config.Config import Config
-# from ..LLM_API.BaseAPI import BaseAPI
-from ..LLM_API.OpenAI import OpenAI_API
-from ..Prompts.BasePromptGenerater import BasePromptGenerater
+from yaa.Config.Config import Config
+# from yaa.LLM_API.BaseAPI import BaseAPI
+from yaa.LLM_API.OpenAI import OpenAI_API
+from yaa.Prompts.BasePromptGenerater import BasePromptGenerater
 
 class BaseAgent:
     """智能体基类"""

+ 1 - 2
yaa/Agent/__init__.py

@@ -1,6 +1,5 @@
 """yaa 智能体模块"""
-from ..Agent.BaseAgent import BaseAgent
-
+from yaa.Agent.BaseAgent import BaseAgent
 
 __all__ = [
     "BaseAgent"

+ 1 - 1
yaa/Client/BaseClient.py

@@ -1,6 +1,6 @@
 import uuid
 from datetime import datetime
-from ..Agent.BaseAgent import BaseAgent
+from yaa.Agent.BaseAgent import BaseAgent
 
 class BaseClient:
     def run(message=None):

+ 1 - 2
yaa/Client/__init__.py

@@ -1,6 +1,5 @@
 """yaa 命令行客户端"""
-from ..Client.BaseClient import BaseClient
-
+from yaa.Client.BaseClient import BaseClient
 
 __all__ = [
     "BaseClient"

+ 2 - 3
yaa/Config/__init__.py

@@ -1,7 +1,6 @@
 """yaa 配置模块"""
-from ..Config.Config import Config
-from ..Config.ServerConfig import ServerConfig
-
+from yaa.Config.Config import Config
+from yaa.Config.ServerConfig import ServerConfig
 
 __all__ = [
     "Config",

+ 1 - 1
yaa/LLM_API/OpenAI.py

@@ -2,7 +2,7 @@ import http.client
 import json
 from urllib.parse import urlparse
 
-from ..LLM_API import BaseAPI
+from yaa.LLM_API import BaseAPI
 
 class OpenAI_API(BaseAPI):
     def request(session_data):

+ 2 - 3
yaa/LLM_API/__init__.py

@@ -1,7 +1,6 @@
 """大语言模型 API 接口模块"""
-from ..LLM_API.BaseAPI import BaseAPI
-from ..LLM_API.OpenAI import OpenAI_API
-
+from yaa.LLM_API.BaseAPI import BaseAPI
+from yaa.LLM_API.OpenAI import OpenAI_API
 
 __all__ = [
     "BaseAPI",

+ 1 - 2
yaa/Prompts/__init__.py

@@ -1,5 +1,4 @@
-from ..Prompts.BasePromptGenerater import BasePromptGenerater
-
+from yaa.Prompts.BasePromptGenerater import BasePromptGenerater
 
 __all__ = [
     "BasePromptGenerater"

+ 1 - 1
yaa/Server/BaseServer.py

@@ -8,7 +8,7 @@
 
 import socket
 import json
-from ..Agent.BaseAgent import BaseAgent
+from yaa.Agent.BaseAgent import BaseAgent
 
 class BaseServer:
     def __init__(self, config=None):

+ 1 - 2
yaa/Server/__init__.py

@@ -1,6 +1,5 @@
 """yaa 服务端接口"""
-from ..Server.BaseServer import BaseServer
-
+from yaa.Server.BaseServer import BaseServer
 
 __all__ = [
     "BaseServer"

+ 1 - 2
yaa/Tools/__init__.py

@@ -1,5 +1,4 @@
-from ..Tools.BaseTool import BaseTool
-
+from yaa.Tools.BaseTool import BaseTool
 
 __all__ = [
     "BaseTool"

+ 4 - 4
yaa/yaa.py

@@ -8,10 +8,10 @@
 
 import sys
 import argparse
-from .Client.BaseClient import BaseClient
-from .Config.Config import Config
-from .Config.ServerConfig import ServerConfig
-from .Server.BaseServer import BaseServer
+from yaa.Client.BaseClient import BaseClient
+from yaa.Config.Config import Config
+from yaa.Config.ServerConfig import ServerConfig
+from yaa.Server.BaseServer import BaseServer
 
 sys.path.append('..')
 def main():