Spaces:
Sleeping
Sleeping
Download python_backend/src/Agents/nodes/question_generator_node.py from VashuTheGreat2/ML-Learner: direct link, hf CLI and curl.
- Browser
- Download file 708 Bytes
-
https://huggingface.co/spaces/VashuTheGreat2/ML-Learner/resolve/main/python_backend/src/Agents/nodes/question_generator_node.py
- Command line
-
hf download hf://spaces/VashuTheGreat2/ML-Learner/python_backend/src/Agents/nodes/question_generator_node.py
-
curl -L -o question_generator_node.py https://huggingface.co/spaces/VashuTheGreat2/ML-Learner/resolve/main/python_backend/src/Agents/nodes/question_generator_node.py
708 Bytes
| from utils.asyncHandler import asyncHandler | |
| from src.Agents.prompts import QuestionGeneraterPrompt | |
| from src.Agents.llm.llm_loader import llm | |
| from src.Agents.tools.taivily_search_tool import Taivily_search | |
| from src.Agents.models.interview_model import ChatState | |
| from langsmith import traceable | |
| taivily_search=Taivily_search()._tavily_search() | |
| tools=[taivily_search] | |
| async def generate_questions(state:ChatState): | |
| prompt = QuestionGeneraterPrompt.format(topic=state.topic) | |
| llm_with_tools = llm.bind_tools(tools=tools) | |
| res = llm_with_tools.invoke(prompt) | |
| return {'questions_generated':res.content} |