mirror of
https://github.com/open-webui/pipelines
synced 2025-05-12 08:30:43 +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 schemas import OpenAIChatMessage
|
||||||
|
|
||||||
from llama_index.embeddings.ollama import OllamaEmbedding
|
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
|
from llama_index.core import Settings
|
||||||
|
|
||||||
ollama_embedding = OllamaEmbedding(
|
|
||||||
|
Settings.embed_model = OllamaEmbedding(
|
||||||
model_name="nomic-embed-text",
|
model_name="nomic-embed-text",
|
||||||
base_url="http://localhost:11434",
|
base_url="http://localhost:11434",
|
||||||
)
|
)
|
||||||
|
Settings.llm = Ollama(model="llama3")
|
||||||
Settings.embed_model = ollama_embedding
|
|
||||||
Settings.llm = OpenAI(
|
|
||||||
temperature=0, model="llama3", api_key="none", api_base="http://localhost:11434"
|
|
||||||
)
|
|
||||||
|
|
||||||
from llama_index.core import VectorStoreIndex, SimpleDirectoryReader
|
from llama_index.core import VectorStoreIndex, SimpleDirectoryReader
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user