KrishnaHuYaar commited on
Commit
73b44ed
·
verified ·
1 Parent(s): 558a01f

Create llm.py

Browse files
Files changed (1) hide show
  1. llm.py +14 -0
llm.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ from langchain_openai import ChatOpenAI
3
+
4
+ def get_llm():
5
+ return ChatOpenAI(
6
+ model=os.getenv(
7
+ "OPENROUTER_MODEL",
8
+ "meta-llama/llama-3-8b-instruct"
9
+ ),
10
+ api_key=os.getenv("OPENROUTER_API_KEY"),
11
+ base_url="https://openrouter.ai/api/v1",
12
+ temperature=0.4,
13
+ max_tokens=700
14
+ )