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

Documentation for Environment Variables? How to change API Host? #8

Closed
coolaj86 opened this issue Oct 21, 2023 · 4 comments
Closed
Assignees

Comments

@coolaj86
Copy link
Contributor

How to I change the API Host from https://localhost:11434 to something else, such as https://api.example.com or just /api on the same server?

What other environment variables can I set before running npm run build?

@tjbck
Copy link
Contributor

tjbck commented Oct 21, 2023

Hi,

Currently, our web UI supports the OLLAMA_ENDPOINT variable in the format: OLLAMA_ENDPOINT="http://[insert your ollama URL]", where you must include the port number as well. For instance: OLLAMA_ENDPOINT="http://192.168.4.1:11434/".

If you have any further questions or need assistance, please don't hesitate to ask.

@tjbck tjbck closed this as completed Oct 21, 2023
@coolaj86
Copy link
Contributor Author

I had running with the ENVs like this, but it didn't work.

SERVER_ENDPOINT='http://localhost:11434' npm run dev

I think that's because I chose SERVER_ENDPOINT, which was only hardcoded.

Do you know how to change the build step to make use of ENVs? It can't be through process.env.* since that doesn't exist at build time... unless it does?

Maybe PageServerLoad can use process.env.* during the build phase?

@tjbck tjbck self-assigned this Oct 21, 2023
@tjbck
Copy link
Contributor

tjbck commented Oct 22, 2023

With the latest Pull Request #10 commit, you can use the following command:

OLLAMA_API_ENDPOINT='http://localhost:11434' npm run dev

Let me know if you need further assistance.

@ralyodio

This comment was marked as abuse.

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