mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-09 07:16:04 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
10ec79312e | ||
|
|
24f779ff95 |
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "langbot"
|
name = "langbot"
|
||||||
version = "4.6.0"
|
version = "4.6.1"
|
||||||
description = "Easy-to-use global IM bot platform designed for LLM era"
|
description = "Easy-to-use global IM bot platform designed for LLM era"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
license-files = ["LICENSE"]
|
license-files = ["LICENSE"]
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
"""LangBot - Easy-to-use global IM bot platform designed for LLM era"""
|
"""LangBot - Easy-to-use global IM bot platform designed for LLM era"""
|
||||||
|
|
||||||
__version__ = '4.6.0'
|
__version__ = '4.6.1'
|
||||||
|
|||||||
@@ -79,8 +79,10 @@ export class WebSocketClient {
|
|||||||
// 构建WebSocket URL
|
// 构建WebSocket URL
|
||||||
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
|
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
|
||||||
// extract host from process.env.NEXT_PUBLIC_API_BASE_URL
|
// extract host from process.env.NEXT_PUBLIC_API_BASE_URL
|
||||||
|
// 如果环境变量未定义,使用当前页面的 host (适配生产环境)
|
||||||
const host =
|
const host =
|
||||||
process.env.NEXT_PUBLIC_API_BASE_URL?.split('://')[1] || '';
|
process.env.NEXT_PUBLIC_API_BASE_URL?.split('://')[1] ||
|
||||||
|
window.location.host;
|
||||||
const url = `${protocol}//${host}/api/v1/pipelines/${this.pipelineId}/ws/connect?session_type=${this.sessionType}`;
|
const url = `${protocol}//${host}/api/v1/pipelines/${this.pipelineId}/ws/connect?session_type=${this.sessionType}`;
|
||||||
|
|
||||||
this.ws = new WebSocket(url);
|
this.ws = new WebSocket(url);
|
||||||
|
|||||||
Reference in New Issue
Block a user