Merge pull request #602 from danielaskdd/fix-azure-model-name-problem

Use LLM_MODEL env var in Azure OpenAI function
This commit is contained in:
zrguo
2025-01-20 12:20:34 +08:00
committed by GitHub
5 changed files with 7 additions and 7 deletions

View File

@@ -13,9 +13,9 @@ LLM_BINDING_HOST=http://host.docker.internal:11434
LLM_MODEL=mistral-nemo:latest
# Lollms example
LLM_BINDING=lollms
LLM_BINDING_HOST=http://host.docker.internal:9600
LLM_MODEL=mistral-nemo:latest
# LLM_BINDING=lollms
# LLM_BINDING_HOST=http://host.docker.internal:9600
# LLM_MODEL=mistral-nemo:latest
# Embedding Configuration (Use valid host. For local services, you can use host.docker.internal)

View File

@@ -9,7 +9,7 @@ User=netman
MemoryHigh=8G
MemoryMax=12G
WorkingDirectory=/home/netman/lightrag-xyj
ExecStart=/home/netman/lightrag-xyj/lightrag/api/start_lightrag_server.sh
ExecStart=/home/netman/lightrag-xyj/start_lightrag_server.sh
Restart=always
RestartSec=10

View File

@@ -427,7 +427,7 @@ This intelligent caching mechanism:
## Install Lightrag as a Linux Service
Create your service file: `lightrag.sevice`. Modified the following lines from `lightrag.sevice.example`
Create your service file: `lightrag-server.sevice`. Modified the following lines from `lightrag-server.sevice.example`
```text
Description=LightRAG Ollama Service

View File

@@ -622,11 +622,11 @@ async def nvidia_openai_complete(
async def azure_openai_complete(
model: str = "gpt-4o-mini", prompt, system_prompt=None, history_messages=[], keyword_extraction=False, **kwargs
prompt, system_prompt=None, history_messages=[], keyword_extraction=False, **kwargs
) -> str:
keyword_extraction = kwargs.pop("keyword_extraction", None)
result = await azure_openai_complete_if_cache(
model,
os.getenv("LLM_MODEL", "gpt-4o-mini"),
prompt,
system_prompt=system_prompt,
history_messages=history_messages,