mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-03 12:34:37 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4011a302af | ||
|
|
deb725a2e2 | ||
|
|
33eb866660 |
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "langbot"
|
||||
version = "4.6.0-beta.1"
|
||||
version = "4.6.0-beta.2"
|
||||
description = "Easy-to-use global IM bot platform designed for LLM era"
|
||||
readme = "README.md"
|
||||
license-files = ["LICENSE"]
|
||||
@@ -46,7 +46,6 @@ dependencies = [
|
||||
"urllib3>=2.4.0",
|
||||
"websockets>=15.0.1",
|
||||
"python-socks>=2.7.1", # dingtalk missing dependency
|
||||
"taskgroup==0.0.0a4", # graingert/taskgroup#20
|
||||
"pip>=25.1.1",
|
||||
"ruff>=0.11.9",
|
||||
"pre-commit>=4.2.0",
|
||||
@@ -108,7 +107,7 @@ requires = ["setuptools>=61.0", "wheel"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[tool.setuptools]
|
||||
package-data = { "langbot" = ["templates/*", "pkg/provider/modelmgr/requesters/*", "pkg/platform/sources/*", "web/out/**"] }
|
||||
package-data = { "langbot" = ["templates/**", "pkg/provider/modelmgr/requesters/*", "pkg/platform/sources/*", "web/out/**"] }
|
||||
|
||||
[dependency-groups]
|
||||
dev = [
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
"""LangBot - Easy-to-use global IM bot platform designed for LLM era"""
|
||||
|
||||
__version__ = '4.6.0-beta.1'
|
||||
__version__ = '4.6.0-beta.2'
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import quart
|
||||
|
||||
import mimetypes
|
||||
from ... import group
|
||||
from langbot.pkg.utils import importutil
|
||||
|
||||
|
||||
@group.group_class('adapters', '/api/v1/platform/adapters')
|
||||
@@ -31,4 +32,6 @@ class AdaptersRouterGroup(group.RouterGroup):
|
||||
if icon_path is None:
|
||||
return self.http_status(404, -1, 'icon not found')
|
||||
|
||||
return await quart.send_file(icon_path)
|
||||
return quart.Response(
|
||||
importutil.read_resource_file_bytes(icon_path), mimetype=mimetypes.guess_type(icon_path)[0]
|
||||
)
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import quart
|
||||
import mimetypes
|
||||
|
||||
from ... import group
|
||||
from langbot.pkg.utils import importutil
|
||||
|
||||
|
||||
@group.group_class('provider/requesters', '/api/v1/provider/requesters')
|
||||
@@ -32,4 +34,6 @@ class RequestersRouterGroup(group.RouterGroup):
|
||||
if icon_path is None:
|
||||
return self.http_status(404, -1, 'icon not found')
|
||||
|
||||
return await quart.send_file(icon_path)
|
||||
return quart.Response(
|
||||
importutil.read_resource_file_bytes(icon_path), mimetype=mimetypes.guess_type(icon_path)[0]
|
||||
)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
semantic_version = 'v4.6.0-beta.1'
|
||||
semantic_version = 'v4.6.0-beta.2'
|
||||
|
||||
required_database_version = 11
|
||||
"""Tag the version of the database schema, used to check if the database needs to be migrated"""
|
||||
|
||||
@@ -41,5 +41,9 @@ def read_resource_file(resource_path: str) -> str:
|
||||
return f.read()
|
||||
|
||||
|
||||
def read_resource_file_bytes(resource_path: str) -> bytes:
|
||||
return importlib.resources.files('langbot').joinpath(resource_path).read_bytes()
|
||||
|
||||
|
||||
def list_resource_files(resource_path: str) -> list[str]:
|
||||
return [f.name for f in importlib.resources.files('langbot').joinpath(resource_path).iterdir()]
|
||||
|
||||
Reference in New Issue
Block a user