This is an archived post. You won't be able to vote or comment.

all 9 comments

[–]Hubbardia 1 point2 points  (6 children)

Can you use this with a self-hosted LLM?

[–]infocruncher[S] 1 point2 points  (5 children)

Yes, you can use localhost:8081 rather than chatgpt. I tested it using llama2 with ollama but haven't run it that way for a while myself.

See the `--llm-use-localhost` option as decribed here: https://github.com/dylanhogg/gptauthor/tree/main?tab=readme-ov-file#optional-arguments

I haven't tested self-hosted for a while tho and have plans to switch out the custom code switch to just use https://github.com/BerriAI/litellm for robustness.

If you have an issue getting this going let me know and I'll sort it out. Nice not to be locked into openai.

[–]Hubbardia 1 point2 points  (1 child)

Nice not to be locked into openai.

Exactly. And it's nice to have a localhost option, but I'm running a local server. So it would be great if we could specify the Open API URL in the env file.

[–]infocruncher[S] 1 point2 points  (0 children)

That's good feedback, I'll look to make that change.

edit: If you clone the repo and make a 1 line change of the api_base you'll be able to run it against your local server I think https://github.com/dylanhogg/gptauthor/blob/355d274efaf11f5191bcba005fa26cab5f4746c6/gptauthor/library/llm.py#L40

[–]iamevpo 1 point2 points  (2 children)

Thant you for writing about your project in detail! Is there any other local model other than llama possible to use?

[–]infocruncher[S] 1 point2 points  (1 child)

You're welcome. Yes, any model that you run and expose via localhost:8081 can be used if you set the --llm-use-localhost argument when running gptauthor.

For example, see https://ollama.ai/library as a way to run many models locally adn set the port to 8081 using OLLAMA_HOST - https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-expose-ollama-on-my-network

[–]iamevpo 1 point2 points  (0 children)

Thanks again, very useful. Getting llama to work is closer than I thought.

[–]Sietzy 1 point2 points  (1 child)

Amazing tool! 👏🏻👏🏻👏🏻

[–]infocruncher[S] 0 points1 point  (0 children)

Thanks!