diff --git a/pilot/helpers/agents/test_Developer.py b/pilot/helpers/agents/test_Developer.py index 14be1be..6411bda 100644 --- a/pilot/helpers/agents/test_Developer.py +++ b/pilot/helpers/agents/test_Developer.py @@ -163,6 +163,7 @@ class TestDeveloper: response = requests.Response() response.status_code = 200 response.iter_lines = lambda: [line] + print(f'##### mock response: {response}') return response mock_requests_post.side_effect = generate_response diff --git a/pilot/utils/llm_connection.py b/pilot/utils/llm_connection.py index 692f248..c8c5916 100644 --- a/pilot/utils/llm_connection.py +++ b/pilot/utils/llm_connection.py @@ -266,6 +266,7 @@ def stream_gpt_completion(data, req_type, project): logger.info(f'> Request model: {model} ({data["model"]}) messages: {data["messages"]}') + logger.info(f'##### build endpoint...') if endpoint == 'AZURE': # If yes, get the AZURE_ENDPOINT from .ENV file @@ -291,6 +292,8 @@ def stream_gpt_completion(data, req_type, project): 'Authorization': 'Bearer ' + os.getenv('OPENAI_API_KEY') } + logger.info(f'##### 0.1, endpoint: {endpoint}, headers: {headers}') + response = requests.post( endpoint_url, headers=headers,