Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can ARM64 use it? #15

Open
CubatLin opened this issue Jun 11, 2024 · 2 comments
Open

Can ARM64 use it? #15

CubatLin opened this issue Jun 11, 2024 · 2 comments

Comments

@CubatLin
Copy link

My code is as below, but it seems not work, please help thanks

from chatgpt_selenium_automation.handler import ChatGPTAutomation

# Define the path where the chrome driver is installed on your computer
chrome_driver_path = r"/chromedriver/chromedriver"

# the sintax r'"..."' is required because the space in "Program Files" in the chrome path
chrome_path = r'"/Applications/Google Chrome.app"'

# xattr -d com.apple.quarantine /Users/ethanwu/Documents/GitHub/llm_project/kgis_openai/chromedriver/chromedriver

# Create an instance
chatgpt = ChatGPTAutomation(chrome_path, chrome_driver_path)

# Define a prompt and send it to chatgpt
prompt = "What are the benefits of exercise?"
chatgpt.send_prompt_to_chatgpt(prompt)

# Retrieve the last response from ChatGPT
response = chatgpt.return_last_response()
print(response)

# Save the conversation to a text file
file_name = "conversation.txt"
chatgpt.save_conversation(file_name)

# Close the browser and terminate the WebDriver session
chatgpt.quit()
@jazeelius
Copy link

I'm also having issues

@sreekanthputta
Copy link

In Mac, the path to launch Google chrome application is /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
use this variable to get it work
chrome_path = r'"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"'

Also, make sure you disable quarantine on the downloaded chromedriver using this command in the terminal.
xattr -d com.apple.quarantine path/to/chromedriver

send_promt_to_chatgpt(prompt) method actually send the prompt, but the python script freezes as there is an issue with check_response_ended() method that it internally uses. Commenting it worked like charm in my Mac M3 Pro ARM based machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants