ParisNeo commited on
Commit
759ae63
·
unverified ·
1 Parent(s): 82c6fbc

Update llm.py

Browse files
Files changed (1) hide show
  1. lightrag/llm.py +2 -2
lightrag/llm.py CHANGED
@@ -354,7 +354,7 @@ async def ollama_model_if_cache(
354
  "Content-Type": "application/json",
355
  "Authorization": f"Bearer {api_key}"
356
  } if api_key else {"Content-Type": "application/json"}
357
- ollama_client = ollama.AsyncClient(host=host, timeout=timeout, headers=headers)
358
  messages = []
359
  if system_prompt:
360
  messages.append({"role": "system", "content": system_prompt})
@@ -418,7 +418,7 @@ async def lollms_model_if_cache(
418
  request_data["prompt"] = full_prompt
419
  timeout = aiohttp.ClientTimeout(total=kwargs.get("timeout", None))
420
 
421
- async with aiohttp.ClientSession(timeout=timeout, headers=headers) as session:
422
  if stream:
423
 
424
  async def inner():
 
354
  "Content-Type": "application/json",
355
  "Authorization": f"Bearer {api_key}"
356
  } if api_key else {"Content-Type": "application/json"}
357
+ ollama_client = ollama.AsyncClient(host=host, timeout=timeout)# temporary fix: (TODO: rewrite this with better compatibility), headers=headers)
358
  messages = []
359
  if system_prompt:
360
  messages.append({"role": "system", "content": system_prompt})
 
418
  request_data["prompt"] = full_prompt
419
  timeout = aiohttp.ClientTimeout(total=kwargs.get("timeout", None))
420
 
421
+ async with aiohttp.ClientSession(timeout=timeout) as session:# temporary fix: (TODO: rewrite this with better compatibility), headers=headers) as session:
422
  if stream:
423
 
424
  async def inner():