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

LLM micro service input data does not have input model name #447

Merged
merged 1 commit into from
Aug 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion comps/llms/text-generation/ollama/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
def llm_generate(input: LLMParamsDoc):
ollama = Ollama(
base_url=ollama_endpoint,
model=input.model,
model=input.model if input.model else model_name,
num_predict=input.max_new_tokens,
top_k=input.top_k,
top_p=input.top_p,
Expand Down Expand Up @@ -49,4 +49,5 @@ async def stream_generator():

if __name__ == "__main__":
ollama_endpoint = os.getenv("OLLAMA_ENDPOINT", "http://localhost:11434")
model_name = os.getenv("OLLAMA_MODEL", "meta-llama/Meta-Llama-3-8B-Instruct")
Spycsh marked this conversation as resolved.
Show resolved Hide resolved
opea_microservices["opea_service@llm_ollama"].start()
Loading