remove code

This commit is contained in:
geekan 2023-12-26 16:39:19 +08:00
parent 4007fc87d6
commit ba8bf01870
5 changed files with 1 additions and 54 deletions

View file

@ -47,11 +47,6 @@ def test_base_gpt_api():
assert "user" in str(message)
base_gpt_api = MockBaseGPTAPI()
msg_prompt = base_gpt_api.messages_to_prompt([message])
assert msg_prompt == "user: hello"
msg_dict = base_gpt_api.messages_to_dict([message])
assert msg_dict == [{"role": "user", "content": "hello"}]
openai_funccall_resp = {
"choices": [

View file

@ -23,14 +23,6 @@ class TestGPT:
answer = llm_api.ask_batch(["请扮演一个Google Python专家工程师如果理解回复明白", "写一个hello world"], timeout=60)
assert len(answer) > 0
def test_llm_api_ask_code(self, llm_api):
try:
answer = llm_api.ask_code(["请扮演一个Google Python专家工程师如果理解回复明白", "写一个hello world"])
logger.info(answer)
assert len(answer) > 0
except openai.BadRequestError:
assert CONFIG.OPENAI_API_TYPE == "azure"
@pytest.mark.asyncio
async def test_llm_api_aask(self, llm_api):
answer = await llm_api.aask("hello chatgpt", stream=False)