MCPcopy Create free account
hub / github.com/NanGePlus/LightRAGTest / llm_model_func

Function llm_model_func

LightRAG/nangeAGICode/test.py:26–35  ·  view source on GitHub ↗
(prompt, system_prompt=None, history_messages=[], **kwargs)

Source from the content-addressed store, hash-verified

24
25# 自定义Chat模型 配置类OpenAI
26async def llm_model_func(prompt, system_prompt=None, history_messages=[], **kwargs) -> str:
27 return await openai_complete_if_cache(
28 model=OPENAI_CHAT_MODEL,
29 prompt=prompt,
30 system_prompt=system_prompt,
31 history_messages=history_messages,
32 api_key=OPENAI_CHAT_API_KEY,
33 base_url=OPENAI_API_BASE,
34 **kwargs
35 )
36
37
38# 自定义Embedding模型 配置类OpenAI

Callers

nothing calls this directly

Calls 1

openai_complete_if_cacheFunction · 0.90

Tested by

no test coverage detected