mirror of
https://github.com/Balshgit/gpt_chat_bot.git
synced 2025-12-16 21:20:39 +03:00
update chat service (#31)
* rename chatgpt service * add zeus tool for new provider * add zeus tool for new provider * update chat service * update README.md
This commit is contained in:
@@ -47,7 +47,7 @@ async def test_get_chatgpt_models(
|
||||
)
|
||||
|
||||
|
||||
async def test_change_chagpt_model_priority(
|
||||
async def test_change_chatgpt_model_priority(
|
||||
dbsession: Session,
|
||||
rest_client: AsyncClient,
|
||||
faker: Faker,
|
||||
@@ -61,10 +61,9 @@ async def test_change_chagpt_model_priority(
|
||||
upd_model1, upd_model2 = dbsession.query(ChatGpt).order_by(ChatGpt.priority).all()
|
||||
|
||||
assert model1.model == upd_model1.model
|
||||
assert model1.priority == upd_model1.priority
|
||||
assert model2.model == upd_model2.model
|
||||
|
||||
updated_from_db_model = dbsession.get(ChatGpt, model2.id)
|
||||
assert updated_from_db_model.priority == priority # type: ignore[union-attr]
|
||||
assert upd_model2.priority == priority
|
||||
|
||||
|
||||
async def test_reset_chatgpt_models_priority(
|
||||
|
||||
@@ -4,7 +4,7 @@ from typing import Any, Iterator
|
||||
import respx
|
||||
from httpx import Response
|
||||
|
||||
from constants import CHAT_GPT_BASE_URI
|
||||
from constants import CHATGPT_BASE_URI
|
||||
|
||||
|
||||
@contextmanager
|
||||
@@ -16,7 +16,7 @@ def mocked_ask_question_api(
|
||||
assert_all_called=True,
|
||||
base_url=host,
|
||||
) as respx_mock:
|
||||
ask_question_route = respx_mock.post(url=CHAT_GPT_BASE_URI, name="ask_question")
|
||||
ask_question_route = respx_mock.post(url=CHATGPT_BASE_URI, name="ask_question")
|
||||
ask_question_route.return_value = return_value
|
||||
ask_question_route.side_effect = side_effect
|
||||
yield respx_mock
|
||||
|
||||
Reference in New Issue
Block a user