Skip to content

Commit

Permalink
fix(requester): unmatched params (#967)
Browse files Browse the repository at this point in the history
  • Loading branch information
RockChinQ committed Dec 26, 2024
1 parent ffb98ec commit e37070a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/provider/modelmgr/requesters/chatcmpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ async def call(
req_messages.append(msg_dict)

try:
return await self._closure(query, req_messages, model, funcs)
return await self._closure(query=query, req_messages=req_messages, use_model=model, use_funcs=funcs)
except asyncio.TimeoutError:
raise errors.RequesterError('请求超时')
except openai.BadRequestError as e:
Expand Down
3 changes: 1 addition & 2 deletions pkg/provider/modelmgr/requesters/deepseekchatcmpl.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from __future__ import annotations

from ....core import app

from . import chatcmpl
from .. import entities, errors, requester
from ....core import entities as core_entities, app
Expand All @@ -19,6 +17,7 @@ def __init__(self, ap: app.Application):

async def _closure(
self,
query: core_entities.Query,
req_messages: list[dict],
use_model: entities.LLMModelInfo,
use_funcs: list[tools_entities.LLMFunction] = None,
Expand Down
3 changes: 2 additions & 1 deletion pkg/provider/modelmgr/requesters/giteeaichatcmpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from . import chatcmpl
from .. import entities, errors, requester
from ....core import app
from ....core import app, entities as core_entities
from ... import entities as llm_entities
from ...tools import entities as tools_entities
from .. import entities as modelmgr_entities
Expand All @@ -24,6 +24,7 @@ def __init__(self, ap: app.Application):

async def _closure(
self,
query: core_entities.Query,
req_messages: list[dict],
use_model: entities.LLMModelInfo,
use_funcs: list[tools_entities.LLMFunction] = None,
Expand Down
1 change: 1 addition & 0 deletions pkg/provider/modelmgr/requesters/moonshotchatcmpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def __init__(self, ap: app.Application):

async def _closure(
self,
query: core_entities.Query,
req_messages: list[dict],
use_model: entities.LLMModelInfo,
use_funcs: list[tools_entities.LLMFunction] = None,
Expand Down

0 comments on commit e37070a

Please sign in to comment.