I got a response from GPT-4 Turbo model containing both tool_call and message content. Is that expected? According to this Chat Completion Message Content + Function_Call - #2 by Foxabilo
we should only get either function call or content.
ChatCompletionMessage(
content='Thought:\nThe workflow involves several steps, including:\n\n1. Opening the OpenAI website in a web browser automation context using Playwright.\n2. Navigating to the Login page.\n3. Clicking on the Login with Google button.\n4. Entering the email "" and proceeding with the login (since I don\'t have access to the password, this step would need to be done manually or skipped in this context).\n5. Navigating to the settings and then to the Organization section.\n6. Finding and copying the Organization ID.\n7. Printing the Organization ID.\n\nAction Plan:\n1. Start by setting up the initial script to launch the browser and open the OpenAI website.\n2. Use exploratory code snippets to obtain the correct selectors or XPaths for each step in the process.\n3. Implement each stage one by one, building up the script incrementally.\n4. Include error handling and wait times for possible network delays and page load times.\n5. Since I cannot actually perform the Google login, we will have to either mock this process or skip that part of the automation script.\n\nFirst, I will provide you with the initial Python script using Playwright to launch the browser and open the OpenAI website. If this is okay with you, I will proceed with the action of executing this first step.',
role="assistant",
function_call=None,
tool_calls=[
ChatCompletionMessageToolCall(
id="call_6g7a7STxdqS7DhOX9GOp8Wyx",
function=Function(
arguments="{\"code_block\":\"from playwright.sync_api import sync_playwright\\n\\nwith sync_playwright() as p:\\n browser = p.chromium.launch(headless=False)\\n page = browser.new_page()\\n page.goto('https://openai.com/')\\n\\n # This is where we would continue to navigate to the login\\n # Since I can't interact with Google login, skipping that\\n\\n browser.close()\\n\\n print('Opened the OpenAI website successfully')\\n\"}",
name="exec_python_code",
),
type="function",
)
],
),