commit fc634a56b3ad64f5882ac172f314e6f96287084e Author: yumoqing Date: Sun Jun 8 08:14:01 2025 +0000 first commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/app/qwen3_chat.py b/app/qwen3_chat.py new file mode 100644 index 0000000..409d47c --- /dev/null +++ b/app/qwen3_chat.py @@ -0,0 +1,9 @@ +from llmengine.qwen3 import Qwen3ChatLLM +from ahserver.serverenv import ServerEnv +from ahserver.webapp import webapp +def init(): + se = ServerEng() + se.chat_engine = Qwen3ChatLLM('/share/models/Qwen/Qwen3-32B') + +if __name__ == '__main__': + webapp(init) diff --git a/conf/config.json b/conf/config.json new file mode 100644 index 0000000..b31993f --- /dev/null +++ b/conf/config.json @@ -0,0 +1,60 @@ +{ + "filesroot":"$[workdir]$/files", + "logger":{ + "name":"qwen3", + "levelname":"info", + "logfile":"$[workdir]$/logs/qwen3.log" + }, + "website":{ + "paths":[ + ["$[workdir]$/wwwroot",""] + ], + "client_max_size":10000, + "host":"0.0.0.0", + "port":9999, + "coding":"utf-8", + "ssl_gg":{ + "crtfile":"$[workdir]$/conf/www.bsppo.com.pem", + "keyfile":"$[workdir]$/conf/www.bsppo.com.key" + }, + "indexes":[ + "index.html", + "index.tmpl", + "index.ui", + "index.dspy", + "index.md" + ], + "startswiths":[ + { + "leading":"/idfile", + "registerfunction":"idfile" + } + ], + "processors":[ + [".ws","ws"], + [".xterm","xterm"], + [".proxy","proxy"], + [".llm", "llm"], + [".llms", "llms"], + [".llma", "llma"], + [".xlsxds","xlsxds"], + [".sqlds","sqlds"], + [".tmpl.js","tmpl"], + [".tmpl.css","tmpl"], + [".html.tmpl","tmpl"], + [".bcrud", "bricks_crud"], + [".tmpl","tmpl"], + [".app","app"], + [".bui","bui"], + [".ui","bui"], + [".dspy","dspy"], + [".md","md"] + ], + "session_max_time":3000, + "session_issue_time":2500, + "session_redis_notuse":{ + "url":"redis://127.0.0.1:6379" + } + } +} + diff --git a/files/README.md b/files/README.md new file mode 100644 index 0000000..e69de29 diff --git a/logs/README.md b/logs/README.md new file mode 100644 index 0000000..e69de29 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..6349d29 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +llmengine +transformers +torch + diff --git a/wwwroot/README.md b/wwwroot/README.md new file mode 100644 index 0000000..e69de29 diff --git a/wwwroot/v1/chat/completions/index.dspy b/wwwroot/v1/chat/completions/index.dspy new file mode 100644 index 0000000..ac3edf8 --- /dev/null +++ b/wwwroot/v1/chat/completions/index.dspy @@ -0,0 +1,7 @@ + +async def get_llm_data(): + async for chunk in chat_engine.stream_generate(params_kw.prompt,sys_prompt=params.kw.sys_prompt): + yield chunk + +await stream_response(request, get_llm_data) + diff --git a/wwwroot/v1/chat/index.ui b/wwwroot/v1/chat/index.ui new file mode 100644 index 0000000..b8fe707 --- /dev/null +++ b/wwwroot/v1/chat/index.ui @@ -0,0 +1,6 @@ +{ + "widgettype":"Text", + "options":{ + "text": "Nothing under here" + } +} diff --git a/wwwroot/v1/index.ui b/wwwroot/v1/index.ui new file mode 100644 index 0000000..b8fe707 --- /dev/null +++ b/wwwroot/v1/index.ui @@ -0,0 +1,6 @@ +{ + "widgettype":"Text", + "options":{ + "text": "Nothing under here" + } +}