Open 26Ssr opened 1 month ago
if I want to change Ollama to xinference,what should i do
Hey! If you don't want to use Ollama, then you can just skip launching and using the embeddings_proxy.py. You just need to adjust the .env variables to point to your base URL and model names that Xinference, or any other provider, is serving.
okay,TX for your answer. :) I creat the .env before the step five [Launch the Indexing and Prompt Tuning UI] as the shown below , what should I change if I want to use xinference? then I creat the index_app.py and paste your code I run gradio index_app.py. but I get the error like the 1L , what mean AttributeError: 'NoneType' object has no attribute 'rstrip'
Hmm....I keep trying but I can't seem to be able to replicate your error with the strip. The strip has to do with this function that helps clean up and standardize the base URL in case someone puts in /api or something on accident:
def normalize_api_base(api_base: str) -> str:
"""Normalize the API base URL by removing trailing slashes and /v1 suffixes."""
api_base = api_base.rstrip('/')
if api_base.endswith('/v1'):
api_base = api_base[:-3]
return api_base
This should interfere with anything hopefully since your env looks correct. I'll see if I can remove the function and still achieve my intended outcome. Also, are you launching the api.py server along with the index_app.py?
you mean for the step three: python api.py --host 0.0.0.0 --port 8012 --reload ? Yes, i launch the api serve before i launch the index_app.py. but after it successful i I quit. (ctrl +z)
the code is a part of the orginal, or i should add it into the index_app.py?
Got same error, I feel the configuration is some confusing.
So what do I need to change
So what do I need to change
I have no idea yet.
you mean for the step three: python api.py --host 0.0.0.0 --port 8012 --reload ? Yes, i launch the api serve before i launch the index_app.py. but after it successful i I quit. (ctrl +z)
the code is a part of the orginal, or i should add it into the index_app.py?
@26Ssr python api.py --host 0.0.0.0 --port 8012 --reload , keep it alive
When I launch the Indexing and prompt tuning UI, I get the error.
And I don
t want to use ollama ,so I skip (If using Ollama for embeddings, launch the embedding proxy: python embedding_proxy.py --port 11435 --host http://localhost:11434) I
m not sure maybe it will affect thelaunching of index?