Giter VIP home page Giter VIP logo

Comments (8)

ugorsahin avatar ugorsahin commented on June 3, 2024

Hello,

Can you try with the latest commit 203a0a8 and let me know if it is working on your end?

from talkingheads.

kannstDuMal avatar kannstDuMal commented on June 3, 2024

wow ... quick reaction ;-)
Unfortunately bad news.
Same problem, same exception.
No change ;-(

from talkingheads.

ugorsahin avatar ugorsahin commented on June 3, 2024

Try passing --no-cache-dir to pip install

from talkingheads.

kannstDuMal avatar kannstDuMal commented on June 3, 2024

the two files are up to date to your patch-level (i checked manually) and the debugger also the latest code is executed.

Unfortunately i am not so good at xpath.

Since mouse-over at "GPT-4" in Firefox as well as in Chrome a drop-downmenu appears ... could it be that 2 actions are necessary?

  1. mouse-over GPT-4
  2. then select "Default"

from talkingheads.

ugorsahin avatar ugorsahin commented on June 3, 2024

Hey,

I don't have a premium account anymore so I am not sure if that functionality works. If you can provide screenshots of that and DOM, I can do my best to make sure that function is working. Otherwise, you are welcome to send a PR with a working version.

In my free account, that function opens a modal to funnel into the premium account subscription, that's why I thought it should have worked. However, it seems like there may be an extra step.

from talkingheads.

kannstDuMal avatar kannstDuMal commented on June 3, 2024

ok i got it.

The exception was raised by the "ChatGPT: Tips for getting started" Dialog.
The dialog must be closed first.

in login-function:

	# Find password textbox, enter password
        pass_box = self.sleepy_find_element(By.ID, 'password')
        pass_box.send_keys(password)
        logging.info('Filled password box')
        # Click continue
        pass_box.send_keys(Keys.ENTER)
        time.sleep(1)
        logging.info('Logged in')
    
        # NEW 
        # Click Okey Let's go for ChatGPT: Tips for getting started - Dialog
        OkeyLetsGo_button = self.sleepy_find_element(By.XPATH, '//div[text()="Okay, let’s go"]')
        OkeyLetsGo_button.click()
        time.sleep(1)
        logging.info('Clicked Okay, let’s go button')
        # END NEW
    
        try:
            # Pass introduction

switch_model works now too (little bit hard coded, but tested):

from selenium.webdriver.common.action_chains import ActionChains
...
def switch_model(self, model_name : str, mode : str = 'Default'):
        '''
        Switch the model for ChatGPT+ users.

        Args:
            model_name: str = The name of the model, either GPT-3.5 or GPT-4
            mode: str = For GPT-4 : Name of the Mode: either 'Default', 'Code Interpreter' or 'Plugins'
        Returns:
            bool: True on success, False on fail
        '''
        if model_name in ['GPT-3.5', 'GPT-4']:
            logging.info(f'Switching model to {model_name}')
            try:
                if model_name=='GPT-3.5':
                    self.browser.find_element(By.XPATH, self.gpt_xq.format(model_name)).click()
                    return True
                elif model_name=='GPT-4':
                    element = self.browser.find_element(By.XPATH, self.gpt_xq.format(model_name))
                    actions = ActionChains(self.browser)
                    # only move mouse for mouse over
                    actions.move_to_element(element).perform()
                    # now select the right mode
                    modeElement = self.browser.find_element(By.XPATH, '//span[text()="{}"]'.format(mode))
                    modeElement.click()
                    return True
                else:
                    return False
            except Exceptions.NoSuchElementException:
                logging.error('Button is not present')
        return False

would be great if you could take the code adapted

from talkingheads.

ugorsahin avatar ugorsahin commented on June 3, 2024

It is interesting that I can pass the info screen on my end but not you, I will take a look at this later on.

from talkingheads.

ugorsahin avatar ugorsahin commented on June 3, 2024

This problem is now fixed with 30606ea, the id selector was not working properly, now we skip the tutorial page without clicking anything. Thank you!

from talkingheads.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.