mirror of
https://github.com/Balshgit/gpt_chat_bot.git
synced 2025-12-16 21:20:39 +03:00
add gpt/chat api prefix (#33)
* add gpt/chat api prefix * add chatgpt backend url
This commit is contained in:
@@ -4,7 +4,7 @@ from typing import Any, Iterator
|
||||
import respx
|
||||
from httpx import Response
|
||||
|
||||
from constants import CHATGPT_BASE_URI
|
||||
from settings.config import settings
|
||||
|
||||
|
||||
@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=CHATGPT_BASE_URI, name="ask_question")
|
||||
ask_question_route = respx_mock.post(url=settings.chatgpt_backend_url, 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