User
Write something
Weekly Coaching Call is happening in 46 minutes
Need help in fixing bug
I am watching the youtube tutorial on LangChain. In the agent and tools section, I used ChatGroq class to use Groq models instead of using OpenAI model and I got an Runtime error. The rest of the codes remain same. Here is the youtube video link https://youtu.be/yF9kGESAi3M Here is my code: from dotenv import load_dotenv from langchain import hub from langchain.agents import AgentExecutor, create_react_agent from langchain_core.tools import Tool from langchain_groq import ChatGroq # Load environment variables from .env file load_dotenv() # Define a very simple tool function that returns the current time def get_current_time(*args, **kwargs): """Returns the current time in H:MM AM/PM format.""" import datetime # Import datetime module to get current time now = datetime.datetime.now() # Get current time return now.strftime("%I:%M %p") # Format time in H:MM AM/PM format # List of tools available to the agent tools = [ Tool( name="Time", # Name of the tool func=get_current_time, # Function that the tool will execute # Description of the tool description="Useful for when you need to know the current time", ), ] # Pull the prompt template from the hub # ReAct = Reason and Action # https://smith.langchain.com/hub/hwchase17/react prompt = hub.pull("hwchase17/react") # Initialize a ChatOpenAI model llm = ChatGroq(model="llama3-groq-8b-8192-tool-use-preview", temperature=0) # Create the ReAct agent using the create_react_agent function agent = create_react_agent( llm=llm, tools=tools, prompt=prompt, stop_sequence=True, ) # Create an agent executor from the agent and tools agent_executor = AgentExecutor.from_agent_and_tools( agent=agent, tools=tools, verbose=True, ) # Run the agent with a test query response = agent_executor.invoke({"input": "What time is it?"}) # Print the response from the agent print("response:", response)
0
0
Need help in fixing bug
Help in RAG+MODEL+FIREBASE
I am trying to store all my messages in firebase, I have used the same code of RAG as in Video. I am geeting error related to storing the chat messages. I have got that error is related to the chat_message object in the below code, but not able to understand what change need to be done in the code to store the AI and human messages when using RAG with model and chat history. Any guidance will be really helpful.Attaching screenshot
0
1
New comment 8h ago
Help in RAG+MODEL+FIREBASE
Json from structures database
i need help saving structured data- jain to chroma, and fetch results. i am getting inconsistent results. any project someone can point me to for some ideas
0
2
New comment 14h ago
RAG Chroma DB Issue
I'm on your 3hr Langchain YT course, and in the RAG section, where the code is supposed to automatically create a vector data store, the code runs and says it created the vector store, but it doesn't for some reason and I don't know why:
0
2
New comment 3d ago
RAG Chroma DB Issue
Issue working with 1a_rag_basics.py
Hi, please help, While executing the script, getting below errors: Importing the numpy C-extensions failed. This error can happen for many reasons, often due to issues with your setup or how NumPy was installed. * The Python version is: Python3.11 from "C:\Users\kumar\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\Local\pypoetry\Cache\virtualenvs\langchain-crash-course-Sz1573gC-py3.11\Scripts\python.exe" * The NumPy version is: "1.26.4" Original error was: DLL load failed while importing _multiarray_umath: The specified module could not be found. ImportError: Error importing numpy: you should not try to import numpy from its source directory; please exit the numpy source tree, and relaunch your python interpreter from there.
0
0
1-24 of 24
AI Developer Accelerator
skool.com/ai-developer-accelerator
Master AI & software development to build apps and unlock new income streams. Transform ideas into profits. 💡➕🤖➕👨‍💻🟰💰
Leaderboard (30-day)
powered by