mirror of
https://github.com/open-webui/pipelines
synced 2025-05-10 23:50:45 +00:00
fix
This commit is contained in:
parent
35f3501fbe
commit
0494004f5c
@ -2,18 +2,15 @@ from typing import List, Union, Generator
|
||||
from schemas import OpenAIChatMessage
|
||||
|
||||
from llama_index.embeddings.ollama import OllamaEmbedding
|
||||
from llama_index.llms.openai import OpenAI
|
||||
from llama_index.llms.ollama import Ollama
|
||||
from llama_index.core import Settings
|
||||
|
||||
ollama_embedding = OllamaEmbedding(
|
||||
|
||||
Settings.embed_model = OllamaEmbedding(
|
||||
model_name="nomic-embed-text",
|
||||
base_url="http://localhost:11434",
|
||||
)
|
||||
|
||||
Settings.embed_model = ollama_embedding
|
||||
Settings.llm = OpenAI(
|
||||
temperature=0, model="llama3", api_key="none", api_base="http://localhost:11434"
|
||||
)
|
||||
Settings.llm = Ollama(model="llama3")
|
||||
|
||||
from llama_index.core import VectorStoreIndex, SimpleDirectoryReader
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user