neo4j-labs / llm-graph-builder

Neo4j graph construction from unstructured data using LLMs
https://neo4j.com/labs/genai-ecosystem/llm-graph-builder/
Apache License 2.0
2k stars 289 forks source link

Ollama local LLM #591

Open carloposo opened 1 month ago

carloposo commented 1 month ago

Hello, so I am about to try the Graph Builder for the first time. With Ollama. I need my data (PDFs etc.) te be kept private and to use the tool totally offline. Newby question: is the OPENAI_API_KEY still mandatory?

Thanks!

gy850222 commented 1 month ago

Hello, Keep OPENAI_SPI_KEY empty

backend .env

OPENAI_API_KEY = "" DIFFBOT_API_KEY = "" GROQ_API_KEY = "" EMBEDDING_MODEL = "all-MiniLM-L6-v2" IS_EMBEDDING = "true" KNN_MIN_SCORE = "0.94"

Enable Gemini (default is False) | Can be False or True

GEMINI_ENABLED = False

Enable Google Cloud logs (default is False) | Can be False or True

GCP_LOG_METRICS_ENABLED = False NUMBER_OF_CHUNKS_TO_COMBINE = 6 UPDATE_GRAPH_CHUNKS_PROCESSED = 20 NEO4J_URI = "" NEO4J_USERNAME = "" NEO4J_PASSWORD = "" NEO4J_DATABASE = "" AWS_ACCESS_KEY_ID = "" AWS_SECRET_ACCESS_KEY = "" LANGCHAIN_API_KEY = "" LANGCHAIN_PROJECT = "" LANGCHAIN_TRACING_V2 = "" LANGCHAIN_ENDPOINT = "" GCS_FILE_CACHE = "" #save the file into GCS or local, SHould be True or False NEO4J_USER_AGENT="" ENABLE_USER_AGENT = "" LLM_MODEL_CONFIG_model_version="" ENTITY_EMBEDDING="True"

examples

LLM_MODEL_CONFIG_azure_ai_gpt_35="azure_deployment_name,azure_endpoint or base_url,azure_api_key,api_version" LLM_MODEL_CONFIG_azure_ai_gpt_4o="gpt-4o,https://YOUR-ENDPOINT.openai.azure.com/,azure_api_key,api_version" LLM_MODEL_CONFIG_groq_llama3_70b="model_name,base_url,groq_api_key" LLM_MODEL_CONFIG_anthropic_claude_3_5_sonnet="model_name,anthropic_api_key" LLM_MODEL_CONFIG_fireworks_llama_v3_70b="model_name,fireworks_api_key" LLM_MODEL_CONFIG_bedrock_claude_3_5_sonnet="model_name,aws_access_key_id,aws_secret__access_key,region_name" LLM_MODEL_CONFIG_ollama_llama3="llama3:latest,http://192.168.164.2:11434"

jexp commented 1 month ago

Thank you for the help @gy850222

jexp commented 1 month ago

@carloposo did you get it to run?

carloposo commented 1 month ago

Thank you @gy850222 @jexp will try this week, keep you posted!