lucgagan / auto-playwright

Automating Playwright steps using ChatGPT.
https://ray.run/blog/auto-playwright
MIT License
394 stars 56 forks source link

Add Ollama support #6

Open inluxc opened 10 months ago

inluxc commented 10 months ago

Add Ollama support instead of chatGPT.

lucgagan commented 10 months ago

What needs to be done to support it?

inluxc commented 10 months ago

Basically Ollama support is an open-source alternative to chatGPT by Meta which is free. https://ollama.ai/

lucgagan commented 10 months ago

But does it work with OpenAI SDK?

sabatale commented 10 months ago

Using a universal connector would probably satisfy everyone, and facilitate adoption: https://github.com/BerriAI/litellm.

lucgagan commented 9 months ago

That looks good. Would you be open to implementing that?

sabatale commented 9 months ago

Considering Langchain Python/JS already fits the use case (playwright and non-OpenAI frameworks), I'm not sure this is really needed.

danielvanmil commented 8 months ago

Considering Langchain Python/JS already fits the use case (playwright and non-OpenAI frameworks), I'm not sure this is really needed.

I got also interested: it seems the JS/TS version of Playwright is not available as I see https://python.langchain.com/docs/integrations/toolkits/playwright, but not the JS version?

michaelschort commented 5 months ago

Ollama is self-hosted drop-in-replacement of OpenAI and should work out of the box with this project. There is a Blogpost from Ollama : https://ollama.com/blog/openai-compatibility where also is an Example.

As far as I see, there is just a baseURL that needs to be provided besides the Model. Api Key is not necessary for Self-Hosted Ollama and is ignored when passed.

probably a small change here will help: https://github.com/lucgagan/auto-playwright/blob/22c8f2f1e70e794795bc7b4c2d3118e2180d8300/src/completeTask.ts#L12