袁聪的第一次提交,包含nl2sql,行情数据,场外申购
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import os
|
||||
from collections.abc import Mapping
|
||||
from dataclasses import dataclass
|
||||
from typing import Any, Protocol
|
||||
from typing import Any, Protocol, cast
|
||||
|
||||
import httpx
|
||||
from sqlalchemy import select
|
||||
@@ -91,7 +91,9 @@ class DatabaseModelGateway:
|
||||
))
|
||||
if endpoint is None:
|
||||
raise RecoverableAgentError("模型端点未注册或未激活")
|
||||
adapter = OpenAICompatibleGateway({endpoint.endpoint_code: endpoint})
|
||||
adapter = OpenAICompatibleGateway({
|
||||
endpoint.endpoint_code: cast(EndpointSettings, endpoint)
|
||||
})
|
||||
return await adapter.generate(
|
||||
endpoint_code=endpoint.endpoint_code, prompt=prompt, timeout_ms=timeout_ms
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user