Spaces:
Build error
Build error
Commit ·
0989d5f
1
Parent(s): 27d6c4f
updated temperature value and use of groq model for faster execution
Browse filesFiles changed (4)
33 unmodified lines343536373839402 unmodified lines4344454647484928 unmodified lines7879808182838433 unmodified linesfrom typing import Any, Optionalimport re # For stripping markdown fencesfrom langchain_openai import ChatOpenAIfrom langchain_core.messages import AIMessage, HumanMessage, SystemMessagefrom langchain_core.tools import toolfrom langgraph.graph import END, StateGraph2 unmodified lines# 0. Global config###############################################################################MODEL_NAME = os.getenv("LANGGRAPH_MODEL", "gpt-4o-mini")TIMEOUT_SEC = int(os.getenv("LANGGRAPH_TIMEOUT_SEC", "30"))###############################################################################28 unmodified lines# 2. LLM backend###############################################################################llm = ChatOpenAI(model_name=MODEL_NAME, temperature=0.0)################################################################################ 3. Dataclass‑based state & LangGraph33 unmodified lines343536373839402 unmodified lines4344454647484928 unmodified lines7879808182838433 unmodified linesfrom typing import Any, Optionalimport re # For stripping markdown fencesfrom langchain_groq import ChatGroqfrom langchain_core.messages import AIMessage, HumanMessage, SystemMessagefrom langchain_core.tools import toolfrom langgraph.graph import END, StateGraph2 unmodified lines# 0. Global config###############################################################################MODEL_NAME = os.getenv("LANGGRAPH_MODEL", "qwen-qwq-32b")TIMEOUT_SEC = int(os.getenv("LANGGRAPH_TIMEOUT_SEC", "30"))###############################################################################28 unmodified lines# 2. LLM backend###############################################################################llm = ChatGroq(model=MODEL_NAME, temperature= 0.6)################################################################################ 3. Dataclass‑based state & LangGraph
214 unmodified lines215216217218219220221214 unmodified linesllm = ChatGoogleGenerativeAI(model="gemini-2.0-flash", temperature=0)elif provider == "groq":# Groq https://console.groq.com/docs/modelsllm = ChatGroq(model="qwen-qwq-32b", temperature=0) # optional : qwen-qwq-32b gemma2-9b-itelif provider == "huggingface":# TODO: Add huggingface endpointllm = ChatHuggingFace(214 unmodified lines215216217218219220221214 unmodified linesllm = ChatGoogleGenerativeAI(model="gemini-2.0-flash", temperature=0)elif provider == "groq":# Groq https://console.groq.com/docs/modelsllm = ChatGroq(model="qwen-qwq-32b", temperature= 0.6) # optional : qwen-qwq-32b gemma2-9b-itelif provider == "huggingface":# TODO: Add huggingface endpointllm = ChatHuggingFace(
__pycache__/code_agent.cpython-313.pyc
__pycache__/langraph_agent.cpython-313.pyc
code_agent.py+3-3
langraph_agent.py+1-1