├── database.db
├── requirements.txt
├── .env.example
├── src
├── tools
│ ├── base_tool.py
│ ├── book_meeting.py
│ ├── file_search.py
│ ├── stripe_payment.py
│ └── product_recommendation.py
├── prompts
│ └── prompts.py
└── agents
│ └── agent.py
├── scripts
├── fetch_index.py
├── create_database.py
├── create_index.py
└── products_list.py
├── main.py
├── README.md
└── files
└── Docs.txt
/database.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kaymen99/AI-Sales-agent/HEAD/database.db
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | litellm
2 | langfuse
3 | langchain_community==0.2.10
4 | langchain-groq
5 | langchain_google_genai
6 | langchain_chroma
7 | chromadb
8 | rank_bm25
9 | unstructured
10 | pydantic
11 | instructor
12 | stripe
13 | colorama
14 | python-dotenv
--------------------------------------------------------------------------------
/.env.example:
--------------------------------------------------------------------------------
1 | GROQ_API_KEY="gsk_xxxx"
2 | CALENDLY_API_KEY="your-api-key"
3 | CALENDLY_EVENT_TYPE_UUID="your-calendly-event-id"
4 | STRIPE_API_KEY="your-api-key"
5 | LANGFUSE_SECRET_KEY="your-secret-key"
6 | LANGFUSE_PUBLIC_KEY="your-public-key"
7 | LANGFUSE_HOST=""
8 |
--------------------------------------------------------------------------------
/src/tools/base_tool.py:
--------------------------------------------------------------------------------
1 | from abc import ABC, abstractmethod
2 | from instructor import OpenAISchema
3 | from typing import Any
4 |
5 | class BaseTool(ABC, OpenAISchema):
6 | @abstractmethod
7 | def run(self):
8 | pass
9 |
10 | # Remove "title" field for all tools parameters
11 | class Config:
12 | @staticmethod
13 | def json_schema_extra(schema: dict[str, Any], model: type['BaseTool']) -> None:
14 | for prop in schema.get('properties', {}).values():
15 | prop.pop('title', None)
--------------------------------------------------------------------------------
/scripts/fetch_index.py:
--------------------------------------------------------------------------------
1 | import os
2 | from langchain_google_genai import GoogleGenerativeAIEmbeddings
3 | from langchain_chroma import Chroma
4 | from langchain_core.prompts import ChatPromptTemplate
5 | from langchain_groq import ChatGroq
6 | from langchain_core.runnables import RunnablePassthrough
7 | from langchain_core.output_parsers import StrOutputParser
8 | from src.prompts.prompts import RAG_SEARCH_PROMPT_TEMPLATE
9 | from dotenv import load_dotenv
10 |
11 | # Load environment variables from a .env file
12 | load_dotenv()
13 |
14 | embeddings = GoogleGenerativeAIEmbeddings(model="models/text-embedding-004")
15 |
16 | vectorstore = Chroma(persist_directory="db", embedding_function=embeddings)
17 |
18 | # Semantic vector search
19 | vectorstore_retreiver = vectorstore.as_retriever(search_kwargs={"k": 3})
20 |
21 | prompt = ChatPromptTemplate.from_template(RAG_SEARCH_PROMPT_TEMPLATE)
22 |
23 | llm = ChatGroq(model="llama3-70b-8192", api_key=os.getenv("GROQ_API_KEY"))
24 |
25 | # build retrieval chain using LCEL
26 | # this will take the user query and generate the answer
27 | rag_chain = (
28 | {"context": vectorstore_retreiver, "question": RunnablePassthrough()}
29 | | prompt
30 | | llm
31 | | StrOutputParser()
32 | )
33 |
34 | query = "Do you have shipment to Paris?"
35 | result = rag_chain.invoke(query)
36 | print(result)
37 |
--------------------------------------------------------------------------------
/src/tools/book_meeting.py:
--------------------------------------------------------------------------------
1 | import os
2 | import requests
3 | from pydantic import Field
4 | from .base_tool import BaseTool
5 |
6 | def generate_calendly_invitation_link(query: str) -> str:
7 | '''Generate a calendly invitation link based on the single query string'''
8 | api_key = os.getenv("CALENDLY_API_KEY")
9 | event_type_uuid = os.getenv("CALENDLY_EVENT_TYPE_UUID")
10 | headers = {
11 | 'Authorization': f'Bearer {api_key}',
12 | 'Content-Type': 'application/json'
13 | }
14 | url = 'https://api.calendly.com/scheduling_links'
15 | payload = {
16 | "max_event_count": 1,
17 | "owner": f"https://api.calendly.com/event_types/{event_type_uuid}",
18 | "owner_type": "EventType"
19 | }
20 |
21 | response = requests.post(url, json=payload, headers=headers)
22 | if response.status_code == 201:
23 | data = response.json()
24 | return f"url: {data['resource']['booking_url']}"
25 | else:
26 | return "Failed to create Calendly link"
27 |
28 | class GenerateCalendlyInvitationLink(BaseTool):
29 | """
30 | A tool that generate a calendly invitation link for a customer based on a single query string.
31 | """
32 | query: str = Field(description='Query string')
33 |
34 | def run(self):
35 | return generate_calendly_invitation_link(self.query)
--------------------------------------------------------------------------------
/src/tools/file_search.py:
--------------------------------------------------------------------------------
1 | import os
2 | from pydantic import Field
3 | from langchain_google_genai import GoogleGenerativeAIEmbeddings
4 | from langchain_chroma import Chroma
5 | from langchain_core.prompts import ChatPromptTemplate
6 | from langchain_groq import ChatGroq
7 | from langchain_core.runnables import RunnablePassthrough
8 | from langchain_core.output_parsers import StrOutputParser
9 | from src.prompts.prompts import RAG_SEARCH_PROMPT_TEMPLATE
10 | from .base_tool import BaseTool
11 |
12 |
13 | def load_retriever():
14 | embeddings = GoogleGenerativeAIEmbeddings(model="models/text-embedding-004")
15 | vectorstore = Chroma(persist_directory="db", embedding_function=embeddings)
16 | vectorstore_retreiver = vectorstore.as_retriever(search_kwargs={"k": 3})
17 | prompt = ChatPromptTemplate.from_template(RAG_SEARCH_PROMPT_TEMPLATE)
18 |
19 | llm = ChatGroq(model="mixtral-8x7b-32768", api_key=os.getenv("GROQ_API_KEY"))
20 | app = (
21 | {"context": vectorstore_retreiver, "question": RunnablePassthrough()}
22 | | prompt
23 | | llm
24 | | StrOutputParser()
25 | )
26 | return app
27 |
28 |
29 | def get_store_info(query: str) -> str:
30 | app = load_retriever()
31 | response = app.invoke(query)
32 | return str(response)
33 |
34 |
35 | class GetStoreInfo(BaseTool):
36 | """
37 | A tool that retrieves information about TechNerds' business, services, and products based on the provided query.
38 | """
39 |
40 | search_query: str = Field(description="Search query")
41 |
42 | def run(self):
43 | return get_store_info(self.search_query)
44 |
--------------------------------------------------------------------------------
/src/tools/stripe_payment.py:
--------------------------------------------------------------------------------
1 | import stripe
2 | import os, sqlite3
3 | from pydantic import Field
4 | from .base_tool import BaseTool
5 | from langsmith import traceable
6 |
7 | @traceable(run_type="tool", name="Generate Stripe link")
8 | def generate_stripe_payment_link(name: str, price: float, quantity: int) -> str:
9 | # Stripe API key
10 | stripe.api_key = os.getenv("STRIPE_API_KEY")
11 | conn = sqlite3.connect("./database.db")
12 | cursor = conn.cursor()
13 |
14 | query = f"SELECT * FROM products WHERE model = '{name}' AND price = {price}"
15 | price_id = None
16 | try:
17 | cursor.execute(query)
18 | rows = cursor.fetchall()
19 | for row in rows:
20 | price_id = row[-2]
21 | except Exception as e:
22 | print(f"An error occurred: {e}")
23 |
24 | # Close the database connection
25 | conn.close()
26 |
27 | if not price_id:
28 | return "Price ID not found"
29 |
30 | session = stripe.checkout.Session.create(
31 | success_url="https://example.com/success",
32 | line_items=[{"price": price_id, "quantity": 1}],
33 | mode="payment",
34 | )
35 | return session.url
36 |
37 |
38 | class GenerateStripePaymentLink(BaseTool):
39 | """
40 | A tool that generate a stripe payment link for a customer based on a single query string.
41 | """
42 |
43 | name: str = Field(description="Name of the product")
44 | price: float = Field(description="Price of the product")
45 | quantity: int = Field(description="Quantity of the product")
46 |
47 | def run(self):
48 | return generate_stripe_payment_link(self.name, self.price, self.quantity)
49 |
--------------------------------------------------------------------------------
/main.py:
--------------------------------------------------------------------------------
1 | import litellm
2 | from colorama import Fore
3 | from dotenv import load_dotenv
4 | from src.agents.agent import Agent
5 | from src.prompts.prompts import SALES_CHATBOT_PROMPT
6 | from src.tools.stripe_payment import GenerateStripePaymentLink
7 | from src.tools.book_meeting import GenerateCalendlyInvitationLink
8 | from src.tools.file_search import GetStoreInfo
9 | from src.tools.product_recommendation import GetProductRecommendation
10 |
11 |
12 | # Load environment variables from a .env file
13 | load_dotenv()
14 |
15 | # set langfuse as a callback, litellm will send the data to langfuse
16 | litellm.success_callback = ["langsmith"]
17 |
18 | # litellm.set_verbose = True
19 |
20 | # Choose any model with LiteLLM
21 | model = "groq/llama3-70b-8192"
22 | # model = "groq/llama-3.1-70b-versatile"
23 | # model = "gemini/gemini-1.5-pro"
24 |
25 | # agent tools
26 | tools_list = [
27 | GenerateCalendlyInvitationLink,
28 | GetStoreInfo,
29 | GetProductRecommendation,
30 | GenerateStripePaymentLink,
31 | ]
32 |
33 | # Initiate the sale agent
34 | agent = Agent("Sale Agent", model, tools_list, system_prompt=SALES_CHATBOT_PROMPT)
35 |
36 | # Add initial/introduction chatbot message
37 | agent.messages.append(
38 | {
39 | "role": "assistant",
40 | "content": "Hey, This is Emily from TechNerds. How can I help you?",
41 | }
42 | )
43 |
44 | print(
45 | Fore.BLUE
46 | + "Enter discussion with TechNerds Sales Agent! Type 'exit' to end the conversation."
47 | )
48 | print(Fore.BLUE + f"Sales Bot: {agent.messages[-1]['content']}")
49 | while True:
50 | user_input = input(Fore.YELLOW + "You: ")
51 | if user_input.lower() == "exit":
52 | print(Fore.BLUE + "Sales Bot: Goodbye!")
53 | break
54 | response = agent.invoke(user_input)
55 | print(Fore.BLUE + f"Sales Bot: {response}")
56 |
--------------------------------------------------------------------------------
/scripts/create_database.py:
--------------------------------------------------------------------------------
1 | import sqlite3
2 | from products_list import products
3 |
4 | # Connect to SQLite database (or create it if it doesn't exist)
5 | conn = sqlite3.connect('database.db')
6 | cursor = conn.cursor()
7 |
8 | # Create table
9 | cursor.execute('''
10 | CREATE TABLE IF NOT EXISTS products (
11 | id INTEGER PRIMARY KEY AUTOINCREMENT,
12 | category TEXT,
13 | model TEXT,
14 | processor TEXT,
15 | memory TEXT,
16 | storage TEXT,
17 | display TEXT,
18 | graphics TEXT,
19 | cooling TEXT,
20 | dpi TEXT,
21 | type TEXT,
22 | capacity TEXT,
23 | read_speed TEXT,
24 | write_speed TEXT,
25 | display_type TEXT,
26 | resolution TEXT,
27 | refresh_rate TEXT,
28 | size TEXT,
29 | connectivity TEXT,
30 | stripe_price_id TEXT,
31 | price REAL
32 | )
33 | ''')
34 |
35 | # Insert data into the table
36 | for product in products:
37 | cursor.execute('''
38 | INSERT INTO products (
39 | category, model, processor, memory, storage, display, graphics, cooling, dpi, type, capacity, read_speed, write_speed, display_type, resolution, refresh_rate, size, connectivity, stripe_price_id, price
40 | ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
41 | ''', (
42 | product.get('category'),
43 | product.get('model'),
44 | product.get('processor'),
45 | product.get('memory'),
46 | product.get('storage'),
47 | product.get('display'),
48 | product.get('graphics'),
49 | product.get('cooling'),
50 | product.get('dpi'),
51 | product.get('type'),
52 | product.get('capacity'),
53 | product.get('read_speed'),
54 | product.get('write_speed'),
55 | product.get('display_type'),
56 | product.get('resolution'),
57 | product.get('refresh_rate'),
58 | product.get('size'),
59 | product.get('connectivity'),
60 | product.get('stripe_price_id'),
61 | product.get('price')
62 | ))
63 |
64 | # Commit changes and close the connection
65 | conn.commit()
66 | conn.close()
--------------------------------------------------------------------------------
/scripts/create_index.py:
--------------------------------------------------------------------------------
1 | import os
2 | from langchain_community.document_loaders import DirectoryLoader
3 | from langchain_text_splitters import RecursiveCharacterTextSplitter
4 | from langchain_google_genai import GoogleGenerativeAIEmbeddings
5 | from langchain_chroma import Chroma
6 | from langchain.retrievers import EnsembleRetriever
7 | from langchain_community.retrievers import BM25Retriever
8 | from langchain_core.prompts import ChatPromptTemplate
9 | from langchain_groq import ChatGroq
10 | from langchain_core.runnables import RunnablePassthrough
11 | from langchain_core.output_parsers import StrOutputParser
12 | from src.prompts.prompts import RAG_SEARCH_PROMPT_TEMPLATE
13 | from dotenv import load_dotenv
14 |
15 | # Load environment variables from a .env file
16 | load_dotenv()
17 |
18 | print("Loading Docs...")
19 | loader = DirectoryLoader("./files")
20 | docs = loader.load()
21 |
22 | print("Splitting Docs...")
23 | doc_splitter = RecursiveCharacterTextSplitter(chunk_size=400, chunk_overlap=200)
24 | doc_chunks = doc_splitter.split_documents(docs)
25 |
26 | print("Loading embedding model...")
27 | embeddings = GoogleGenerativeAIEmbeddings(model="models/text-embedding-004")
28 |
29 | print("Creating vector store...")
30 | vectorstore = Chroma.from_documents(doc_chunks, embeddings, persist_directory="db")
31 |
32 | # Semantic vector search
33 | vectorstore_retreiver = vectorstore.as_retriever(search_kwargs={"k": 3})
34 |
35 | # Keyword search
36 | keyword_retriever = BM25Retriever.from_documents(doc_chunks)
37 | keyword_retriever.k = 3
38 |
39 | # Hybride search
40 | ensemble_retriever = EnsembleRetriever(
41 | retrievers=[vectorstore_retreiver, keyword_retriever], weights=[0.3, 0.7]
42 | )
43 |
44 | prompt = ChatPromptTemplate.from_template(RAG_SEARCH_PROMPT_TEMPLATE)
45 |
46 | llm = ChatGroq(model="llama3-70b-8192", api_key=os.getenv("GROQ_API_KEY"))
47 |
48 | # build retrieval chain using LCEL
49 | # this will take the user query and generate the answer
50 | rag_chain = (
51 | {"context": ensemble_retriever, "question": RunnablePassthrough()}
52 | | prompt
53 | | llm
54 | | StrOutputParser()
55 | )
56 |
57 | query = "What are the prices of laptops?"
58 | result = rag_chain.invoke(query)
59 | print(result)
60 |
--------------------------------------------------------------------------------
/src/tools/product_recommendation.py:
--------------------------------------------------------------------------------
1 | import sqlite3
2 | from pydantic import Field
3 | from .base_tool import BaseTool
4 | from litellm import completion
5 | from langsmith import traceable
6 |
7 | @traceable(run_type="tool", name="GetProductRecommendation")
8 | def get_product_recommendation(product_category, user_query):
9 | """
10 | Retrieves products from the database based on a user query by leveraging an AI agent to generate search queries.
11 |
12 | Args:
13 | product_category (str): The query from the user to search for products.
14 | user_query (str): The user requiremenets query.
15 |
16 | Returns:
17 | list: A list of JSON objects representing the products that match the query.
18 | """
19 |
20 | # Connect to SQLite database
21 | conn = sqlite3.connect("./database.db")
22 | cursor = conn.cursor()
23 |
24 | products = [
25 | (
26 | "model",
27 | "processor",
28 | "memory",
29 | "storage",
30 | "display",
31 | "graphics",
32 | "cooling",
33 | "dpi",
34 | "type",
35 | "capacity",
36 | "read_speed",
37 | "write_speed",
38 | "display_type",
39 | "resolution",
40 | "refresh_rate",
41 | "size",
42 | "connectivity",
43 | "stripe_price_id",
44 | "price",
45 | )
46 | ]
47 | query = f"SELECT * FROM products WHERE category = '{product_category}'"
48 | try:
49 | cursor.execute(query)
50 | rows = cursor.fetchall()
51 | for row in rows:
52 | products.append(row)
53 | except Exception as e:
54 | print(f"An error occurred: {e}")
55 |
56 | # Close the database connection
57 | conn.close()
58 |
59 | # Define the prompt for the AI agent
60 | prompt = """
61 | You are an expert in computer equipment with a deep understanding of various technical
62 | specifications and requirements.
63 | Your task is to recommend computer products based on user needs. You will be provided
64 | with the user requirements query and the list of products available in our store.
65 | Use your expertise to recommend to the user the best products that will fit his needs.
66 |
67 | Your answer must list all the products that might big good fit for the user. It must be
68 | comprehensive and concise as it will be used by the Sale agent to guide the user.
69 | For example:
70 | Based on the user requirements, these are are our best options:
71 | 1. **Laptop X**: Features an Intel i7 processor, NVIDIA RTX 3070 graphics card, 16GB RAM, and 512GB SSD. Price: $1499.99
72 | 2. **Laptop Y**: Comes with an Intel i7 processor, NVIDIA RTX 3070 graphics card, 32GB RAM, and 1TB SSD. Price: $1799.99
73 | """
74 |
75 | message = f"""
76 | USER QUERY: {user_query}
77 | PRODUCTS: {products}
78 | """
79 |
80 | messages = [
81 | {"role": "system", "content": prompt},
82 | {"role": "user", "content": message},
83 | ]
84 |
85 | # Request to the AI agent to generate the SQL query
86 | response = completion(
87 | model="groq/mixtral-8x7b-32768", messages=messages, temperature=0.1
88 | )
89 |
90 | # Extract the SQL queries from the response
91 | output = response.choices[0].message.content
92 |
93 | return output
94 |
95 |
96 | class GetProductRecommendation(BaseTool):
97 | """
98 | A tool that retrieves products from the database based on a user query by leveraging an AI agent to generate search queries.
99 | """
100 |
101 | product_category: str = Field(description="Product category")
102 | user_query: str = Field(description="User query")
103 |
104 | def run(self):
105 | return get_product_recommendation(self.product_category, self.user_query)
106 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | # AI Sales Agent
14 |
15 | I built an AI sales agent for a computer equipement Ecommerce website, the agent will streamline the customer engagement and sales processes, by automating the process of providing **product recommendations**, **answering customers enquires**, **scheduling consultations**, and facilitating **purchases through Stripe**.
16 |
17 |
18 |
19 |
20 |
21 |
22 | ## Features
23 |
24 | - **Customer Engagement**: Interact with customers in a friendly and professional manner, offering accurate information about products and services.
25 | - **Product Recommendations**: Provide personalized product suggestions based on customer needs and preferences.
26 | - **Consultation Scheduling**: Schedule consultations with tech experts for complex inquiries.
27 | - **Purchase Facilitation**: Facilitate payments with Stripe by generating payment links for customers ready to buy, ensuring a smooth transaction process.
28 |
29 | ### Agent Tools
30 |
31 | - **get_store_info**: This leverages RAG search to retrieve general information about the TechNerds business, services, and products. All informations are retrieved from the docs `files/Docs.txt`.
32 | - **get_product_recommendation**: Uses an expert product recommendation agent to find the best products the store can offer based on customer requirements.
33 | - **generate_calendly_invitation_link**: Provide a link for scheduling a consultation with a tech expert through Calendly.
34 | - **generate_stripe_payment_link**: Create a Stripe payment link for customer purchases.
35 |
36 | ## How to Run
37 |
38 | ### Prerequisites
39 |
40 | - Python 3.9+
41 | - Calendly API key
42 | - Stripe API key
43 | - Groq API key
44 | - Necessary Python libraries (listed in `requirements.txt`)
45 |
46 | ### Setup
47 |
48 | 1. **Clone the repository:**
49 |
50 | ```sh
51 | git clone https://github.com/kaymen99/ai-sales-agent.git
52 | cd ai-sales-agent/website-sale-agent
53 | ```
54 |
55 | 2. **Create and activate a virtual environment:**
56 |
57 | ```sh
58 | python -m venv venv
59 | source venv/bin/activate # On Windows use `venv\Scripts\activate`
60 | ```
61 |
62 | 3. **Install the required packages:**
63 |
64 | ```sh
65 | pip install -r requirements.txt
66 | ```
67 |
68 | 4. **Set up environment variables:**
69 |
70 | Create a `.env` file in the root directory of the project and add your API keys:
71 |
72 | ```env
73 | CALENDLY_API_KEY=your_calendly_api_key
74 | CALENDLY_EVENT_TYPE_UUID=your_calendly_event_id
75 | STRIPE_API_KEY=your_stripe_api_key
76 | GROQ_API_KEY=your_stripe_api_key
77 | ```
78 |
79 | ### Running the Application
80 |
81 | 1. To run the project, you must first create the products database (unless you have one already) by executing:
82 |
83 | ```sh
84 | python create_database.py
85 | ```
86 |
87 | 2. **Then start the Sales bot by running:**
88 |
89 | ```sh
90 | python main.py
91 | ```
92 |
93 | ## Contributing
94 |
95 | Contributions are welcome! Please open an issue or submit a pull request for any changes.
96 |
97 | ## Contact
98 |
99 | If you have any questions or suggestions, feel free to contact me at `aymenMir1001@gmail.com`.
100 |
--------------------------------------------------------------------------------
/src/prompts/prompts.py:
--------------------------------------------------------------------------------
1 | SALES_CHATBOT_PROMPT = """
2 | # Role
3 |
4 | You are Emily, a Sales Representative at TechNerds, a leading technology company specializing in high-quality computer equipment.
5 | As an expert in selling computers, hardware, and various tech accessories, your role is to engage with potential customers and guide them through our product offerings and services.
6 |
7 | # Tasks
8 |
9 | 1. Engage customers in a friendly, professional manner.
10 | 2. Provide accurate information about TechNerds' products and services.
11 | 3. Offer personalized product recommendations based on customer needs.
12 | 4. Facilitate the purchase process when a customer is ready to buy.
13 | 5. Schedule consultations with tech experts for complex inquiries.
14 | 6. Continuously gauge the customer's interest and adjust your approach accordingly.
15 |
16 | # SOP
17 |
18 | 1. For service-related inquiries and QA about TechNerds, use the GetStoreInfo tool to retrieve accurate information.
19 | 2. When a customer expresses interest in a specific product category and provides needs or specifications, use the GetProductRecommendation tool to offer tailored suggestions.
20 | 3. If the customer needs more detailed information or customization options, offer to schedule a consultation using the GenerateCalendlyInvitationLink tool.
21 | 4. When a customer decides to make a purchase, follow these exact steps:
22 | * Confirm the product details (name, price, quantity) with the customer.
23 | * Ask the customer about the shipment procedure (delivery address).
24 | * Identify the destination country, and With GetStoreInfo tool, verify that we offer shipment to that country.
25 | * Only if the product details are confirmed by customer and the shipment availibility to the customer address was checked, you can use the StripePaymentTool tool to facilitate the transaction.
26 |
27 | # Tools
28 |
29 | 1. GetStoreInfo: Retrieve general information about TechNerds' business, services, and products for service-related inquiries and QA. Example: GetStoreInfo("What types of services does TechNerds offer?")
30 | 2. GetProductRecommendation: Obtain expert product recommendations based on customer requirements.
31 | - Valid categories: Laptops, Desktops, Monitors, Keyboards, Mice, Graphics Cards, Storage Devices, Networking Equipment, Accessories
32 | - Example: GetProductRecommendation("Laptops", "I need a powerful laptop for gaming and video editing")
33 | 3. GenerateCalendlyInvitationLink: Provide a link for scheduling a consultation with a tech expert. Example: GenerateCalendlyInvitationLink("Consultation for Custom Gaming Laptop")
34 | 4. GenerateStripePaymentLink: Create a payment link for customer purchases.
35 | - Usage: GenerateStripePaymentLink(product_name, price, quantity)
36 | - Requirements: only callable if:
37 | - Customer has confirmed product details (name, price, quantity).
38 | - Shipment availability to the customer address was checked with GetStoreInfo tool.
39 |
40 | # Examples
41 |
42 | **Emily:** Welcome to TechNerds! I'm Emily, your sales representative. How can I assist you today?
43 | **User:** Hi Emily, I'm looking for a new laptop. Can you tell me what kind of options you have?
44 | **Emily:** Of course! I'd be happy to help you find the perfect laptop. Could you tell me a bit more about what you'll be using it for?
45 | **User:** I need a laptop for gaming and video editing.
46 | **Emily:** Great! For gaming and video editing, you'll want a powerful laptop with excellent graphics capabilities and fast processing. I highly recommend our Gaming Laptop X1. It features a high-performance processor, dedicated graphics card, and ample storage, making it perfect for both gaming and video editing tasks. Would you like to know more about its specifications?
47 | **User:** That sounds promising. What's the price for this laptop?
48 | **Emily:** The Gaming Laptop X1 is priced at $899.99. Would you like to proceed with this option, or would you prefer to explore other models?
49 | **User:** That sounds good. I think I'd like to buy this one.
50 | **Emily:** Excellent choice! Just to confirm, you'd like to purchase the Gaming Laptop X1 at $899.99, correct?
51 | **User:** Yes, that's right.
52 | **Emily:** Perfect! Could you please provide your delivery address so I can check if we ship to your location?
53 | **User:** Sure, it's 123 Main Street, Springfield, USA.
54 | **Emily:** Good news! We do ship to Springfield, USA. Now, I'll generate a secure payment link for your Laptop X1. Here is your secure payment link for the Laptop X1: [Payment Link]. Once you complete the payment, you'll receive a confirmation email with details about shipping and estimated delivery time. Is there anything else you'd like to know before proceeding with the purchase?
55 | **User:** No, that's all. Thanks for your help!
56 | **Emily:** You're welcome! If you have any questions after your purchase or need any further assistance, please don't hesitate to reach out. Enjoy your new Laptop X1, and thank you for choosing TechNerds!
57 |
58 | # Important
59 |
60 | - Never mention the use of tools in your responses to customers.
61 | - Keep responses concise and focused. Avoid hedging phrases like "It seems like" "I think" or "Maybe".
62 | - For anything related to the company services that you don't know, use the GetStoreInfo tool, do not invent answers.
63 | - If you're unsure about any information, it's better to offer to check with a specialist than to provide incorrect details.
64 | - Tailor your language to the customer's level of technical knowledge.
65 | """
66 |
67 | RAG_SEARCH_PROMPT_TEMPLATE = """
68 | Using the following pieces of retrieved context, answer the question comprehensively and concisely.
69 | Ensure your response fully addresses the question based on the given context.
70 |
71 | **IMPORTANT:**
72 | Just provide the answer and never mention or refer to having access to the external context or information in your answer.
73 | If you are unable to determine the answer from the provided context, state 'I don't know.'
74 |
75 | Question: {question}
76 | Context: {context}
77 | """
--------------------------------------------------------------------------------
/src/agents/agent.py:
--------------------------------------------------------------------------------
1 | from colorama import Fore, init
2 | from litellm import completion
3 |
4 | # Initialize colorama for colored terminal output
5 | init(autoreset=True)
6 |
7 | class Agent:
8 | """
9 | @title AI Agent Class
10 | @notice This class defines an AI agent that can uses function calling to interact with tools and generate responses.
11 | """
12 |
13 | def __init__(self, name, model, tools=None, system_prompt=""):
14 | """
15 | @notice Initializes the Agent class.
16 | @param model The AI model to be used for generating responses.
17 | @param tools A list of tools that the agent can use.
18 | @param available_tools A dictionary of available tools and their corresponding functions.
19 | @param system_prompt system prompt for agent behaviour.
20 | """
21 | self.name = name
22 | self.model = model
23 | self.messages = []
24 | self.tools = tools if tools is not None else []
25 | self.tools_schemas = self.get_openai_tools_schema() if self.tools else None
26 | self.system_prompt = system_prompt
27 | if self.system_prompt and not self.messages:
28 | self.handle_messages_history("system", self.system_prompt)
29 |
30 | def invoke(self, message):
31 | print(Fore.GREEN + f"\nCalling Agent: {self.name}")
32 | self.handle_messages_history("user", message)
33 | result = self.execute()
34 | return result
35 |
36 | def execute(self):
37 | """
38 | @notice Use LLM to generate a response and handle tool calls if needed.
39 | @return The final response.
40 | """
41 | # First, call the AI to get a response
42 | response_message = self.call_llm()
43 |
44 | # Check if there are tool calls in the response
45 | tool_calls = response_message.tool_calls
46 |
47 | # If there are tool calls, invoke them
48 | if tool_calls:
49 | response_message = self.run_tools(tool_calls)
50 |
51 | return response_message.content
52 |
53 | def run_tools(self, tool_calls):
54 | """
55 | @notice Runs the necessary tools based on the tool calls from the LLM response.
56 | @param tool_calls The list of tool calls from the LLM response.
57 | @return The final response from the LLM after processing tool calls.
58 | """
59 | # For each tool the AI wanted to call, call it and add the tool result to the list of messages
60 | for tool_call in tool_calls:
61 | self.execute_tool(tool_call)
62 |
63 | # Call the AI again so it can produce a response with the result of calling the tool(s)
64 | response_message = self.call_llm()
65 | tool_calls = response_message.tool_calls
66 |
67 | # If the AI decided to invoke a tool again, invoke it
68 | if tool_calls:
69 | response_message = self.run_tools(tool_calls)
70 |
71 | return response_message
72 |
73 | def execute_tool(self, tool_call):
74 | """
75 | @notice Executes a tool based on the tool call from the LLM response.
76 | @param tool_call The tool call from the LLM response.
77 | @return The final response from the LLM after executing the tool.
78 | """
79 | function_name = tool_call.function.name
80 | func = next(
81 | iter([func for func in self.tools if func.__name__ == function_name])
82 | )
83 |
84 | if not func:
85 | return f"Error: Function {function_name} not found. Available functions: {[func.__name__ for func in self.tools]}"
86 |
87 | try:
88 | print(Fore.GREEN + f"\nCalling Tool: {function_name}")
89 | print(Fore.GREEN + f"Arguments: {tool_call.function.arguments}\n")
90 | # init tool
91 | func = func(**eval(tool_call.function.arguments))
92 | # get outputs from the tool
93 | output = func.run()
94 |
95 | tool_message = {"name": function_name, "tool_call_id": tool_call.id}
96 | self.handle_messages_history("tool", output, tool_output=tool_message)
97 |
98 | return output
99 | except Exception as e:
100 | print("Error: ", str(e))
101 | return "Error: " + str(e)
102 |
103 | def call_llm(self):
104 | response = completion(
105 | model=self.model,
106 | messages=self.messages,
107 | tools=self.tools_schemas,
108 | temperature=0.1,
109 | )
110 | message = response.choices[0].message
111 | if message.tool_calls is None:
112 | message.tool_calls = []
113 | if message.function_call is None:
114 | message.function_call = {}
115 | self.handle_messages_history(
116 | "assistant", message.content, tool_calls=message.tool_calls
117 | )
118 | return message
119 |
120 | def reset(self):
121 | self.messages = []
122 | if self.system_prompt:
123 | self.messages.append({"role": "system", "content": self.system_prompt})
124 |
125 | def get_openai_tools_schema(self):
126 | return [
127 | {"type": "function", "function": tool.openai_schema} for tool in self.tools
128 | ]
129 |
130 | def handle_messages_history(self, role, content, tool_calls=None, tool_output=None):
131 | message = {"role": role, "content": content}
132 | if tool_calls:
133 | message["tool_calls"] = self.parse_tool_calls(tool_calls)
134 | if tool_output:
135 | message["name"] = tool_output["name"]
136 | message["tool_call_id"] = tool_output["tool_call_id"]
137 | # save short-term memory
138 | self.messages.append(message)
139 |
140 | def parse_tool_calls(self, calls):
141 | parsed_calls = []
142 | for call in calls:
143 | parsed_call = {
144 | "function": {
145 | "name": call.function.name,
146 | "arguments": call.function.arguments,
147 | },
148 | "id": call.id,
149 | "type": call.type,
150 | }
151 | parsed_calls.append(parsed_call)
152 | return parsed_calls
153 |
--------------------------------------------------------------------------------
/scripts/products_list.py:
--------------------------------------------------------------------------------
1 | # A sample products list (created with chatGPT)
2 | # stripe_price_id is the same test stripe product
3 | # should integrated with real products DB in production
4 | products = [
5 | {
6 | "category": "Laptops",
7 | "model": "Dell XPS 13",
8 | "processor": "Intel Core i5",
9 | "memory": "8GB DDR4",
10 | "storage": "256GB SSD",
11 | "display": "13-inch Full HD",
12 | "graphics": "Integrated Intel UHD",
13 | "stripe_price_id" : "price_1PhAgsDhcxHZPqUXh81bslrj",
14 | "price": 700
15 | },
16 | {
17 | "category": "Laptops",
18 | "model": "MacBook Pro 15",
19 | "processor": "Intel Core i7",
20 | "memory": "16GB DDR4",
21 | "storage": "512GB SSD",
22 | "display": "15-inch Full HD",
23 | "graphics": "NVIDIA GeForce GTX 1650",
24 | "stripe_price_id" : "price_1PhAgsDhcxHZPqUXh81bslrj",
25 | "price": 1200
26 | },
27 | {
28 | "category": "Laptops",
29 | "model": "HP Envy 17",
30 | "processor": "AMD Ryzen 7",
31 | "memory": "16GB DDR4",
32 | "storage": "1TB SSD",
33 | "display": "17-inch 4K",
34 | "graphics": "AMD Radeon RX 580",
35 | "stripe_price_id" : "price_1PhAgsDhcxHZPqUXh81bslrj",
36 | "price": 2000
37 | },
38 | {
39 | "category": "Desktops",
40 | "model": "Alienware Aurora R11",
41 | "processor": "Intel Core i7",
42 | "memory": "16GB DDR4",
43 | "storage": "1TB HDD",
44 | "graphics": "NVIDIA GeForce RTX 2060",
45 | "cooling": "Air cooling",
46 | "stripe_price_id" : "price_1PhAgsDhcxHZPqUXh81bslrj",
47 | "price": 1000
48 | },
49 | {
50 | "category": "Desktops",
51 | "model": "Corsair One i200",
52 | "processor": "Intel Core i9",
53 | "memory": "32GB DDR4",
54 | "storage": "2TB SSD",
55 | "graphics": "NVIDIA GeForce RTX 3080",
56 | "cooling": "Liquid cooling",
57 | "stripe_price_id" : "price_1PhAgsDhcxHZPqUXh81bslrj",
58 | "price": 2500
59 | },
60 | {
61 | "category": "Desktops",
62 | "model": "CyberPowerPC Gamer Supreme",
63 | "processor": "AMD Ryzen 9",
64 | "memory": "64GB DDR4",
65 | "storage": "1TB SSD + 2TB HDD",
66 | "graphics": "AMD Radeon RX 6900 XT",
67 | "cooling": "Liquid cooling",
68 | "stripe_price_id" : "price_1PhAgsDhcxHZPqUXh81bslrj",
69 | "price": 3000
70 | },
71 | {
72 | "category": "Monitors",
73 | "model": "Dell UltraSharp U2419H",
74 | "display_type": "IPS",
75 | "resolution": "1920x1080",
76 | "refresh_rate": "60Hz",
77 | "size": "24-inch",
78 | "connectivity": "HDMI, DisplayPort",
79 | "stripe_price_id" : "price_1PhAgsDhcxHZPqUXh81bslrj",
80 | "price": 200
81 | },
82 | {
83 | "category": "Monitors",
84 | "model": "Samsung Odyssey G7",
85 | "display_type": "VA",
86 | "resolution": "2560x1440",
87 | "refresh_rate": "144Hz",
88 | "size": "27-inch",
89 | "connectivity": "HDMI, DisplayPort, USB-C",
90 | "stripe_price_id" : "price_1PhAgsDhcxHZPqUXh81bslrj",
91 | "price": 400
92 | },
93 | {
94 | "category": "Monitors",
95 | "model": "LG UltraFine 32UL950-W",
96 | "display_type": "OLED",
97 | "resolution": "3840x2160",
98 | "refresh_rate": "120Hz",
99 | "size": "32-inch",
100 | "connectivity": "HDMI, DisplayPort, USB-C",
101 | "stripe_price_id" : "price_1PhAgsDhcxHZPqUXh81bslrj",
102 | "price": 1000
103 | },
104 | {
105 | "category": "Keyboards",
106 | "model": "Corsair K95 RGB Platinum",
107 | "type": "Mechanical",
108 | "switch_type": "Cherry MX Red",
109 | "lighting": "RGB",
110 | "connectivity": "Wired USB",
111 | "stripe_price_id" : "price_1PhAgsDhcxHZPqUXh81bslrj",
112 | "price": 100
113 | },
114 | {
115 | "category": "Keyboards",
116 | "model": "Logitech K120",
117 | "type": "Membrane",
118 | "switch_type": "Quiet keys",
119 | "lighting": "Single color",
120 | "connectivity": "Wired USB",
121 | "stripe_price_id" : "price_1PhAgsDhcxHZPqUXh81bslrj",
122 | "price": 50
123 | },
124 | {
125 | "category": "Keyboards",
126 | "model": "Razer BlackWidow V3 Pro",
127 | "type": "Mechanical",
128 | "switch_type": "Cherry MX Blue",
129 | "lighting": "RGB",
130 | "connectivity": "Wireless",
131 | "stripe_price_id" : "price_1PhAgsDhcxHZPqUXh81bslrj",
132 | "price": 150
133 | },
134 | {
135 | "category": "Mice",
136 | "model": "Logitech G502 Hero",
137 | "sensor_type": "Optical",
138 | "dpi": "8000 DPI",
139 | "buttons": "6 programmable",
140 | "connectivity": "Wired USB",
141 | "stripe_price_id" : "price_1PhAgsDhcxHZPqUXh81bslrj",
142 | "price": 50
143 | },
144 | {
145 | "category": "Mice",
146 | "model": "Razer DeathAdder V2",
147 | "sensor_type": "Laser",
148 | "dpi": "16000 DPI",
149 | "buttons": "8 programmable",
150 | "connectivity": "Wireless",
151 | "stripe_price_id" : "price_1PhAgsDhcxHZPqUXh81bslrj",
152 | "price": 100
153 | },
154 | {
155 | "category": "Mice",
156 | "model": "SteelSeries Rival 650",
157 | "sensor_type": "Optical",
158 | "dpi": "12000 DPI",
159 | "buttons": "7 programmable",
160 | "connectivity": "Bluetooth",
161 | "stripe_price_id" : "price_1PhAgsDhcxHZPqUXh81bslrj",
162 | "price": 75
163 | },
164 | {
165 | "category": "Graphics Cards",
166 | "model": "ASUS ROG Strix RTX 3060",
167 | "chipset": "NVIDIA GeForce RTX 3060",
168 | "memory": "12GB GDDR6",
169 | "cooling": "Dual-fan",
170 | "stripe_price_id" : "price_1PhAgsDhcxHZPqUXh81bslrj",
171 | "price": 400
172 | },
173 | {
174 | "category": "Graphics Cards",
175 | "model": "EVGA GeForce RTX 3080 FTW3",
176 | "chipset": "NVIDIA GeForce RTX 3080",
177 | "memory": "10GB GDDR6X",
178 | "cooling": "Triple-fan",
179 | "stripe_price_id" : "price_1PhAgsDhcxHZPqUXh81bslrj",
180 | "price": 800
181 | },
182 | {
183 | "category": "Graphics Cards",
184 | "model": "Sapphire Nitro+ RX 6800 XT",
185 | "chipset": "AMD Radeon RX 6800 XT",
186 | "memory": "16GB GDDR6",
187 | "cooling": "Liquid cooling",
188 | "stripe_price_id" : "price_1PhAgsDhcxHZPqUXh81bslrj",
189 | "price": 900
190 | },
191 | {
192 | "category": "Storage Devices",
193 | "model": "Samsung 860 EVO",
194 | "type": "SATA SSD",
195 | "capacity": "512GB",
196 | "read_speed": "550MB/s",
197 | "write_speed": "520MB/s",
198 | "stripe_price_id" : "price_1PhAgsDhcxHZPqUXh81bslrj",
199 | "price": 100
200 | },
201 | {
202 | "category": "Storage Devices",
203 | "model": "WD Black SN750",
204 | "type": "NVMe SSD",
205 | "capacity": "1TB",
206 | "read_speed": "3500MB/s",
207 | "write_speed": "3300MB/s",
208 | "stripe_price_id" : "price_1PhAgsDhcxHZPqUXh81bslrj",
209 | "price": 200
210 | },
211 | {
212 | "category": "Storage Devices",
213 | "model": "Seagate Barracuda",
214 | "type": "HDD",
215 | "capacity": "2TB",
216 | "read_speed": "160MB/s",
217 | "write_speed": "150MB/s",
218 | "stripe_price_id" : "price_1PhAgsDhcxHZPqUXh81bslrj",
219 | "price": 80
220 | },
221 | {
222 | "category": "Networking Equipment",
223 | "model": "TP-Link Archer A7",
224 | "type": "Dual-band Router",
225 | "speed": "AC1200",
226 | "features": "MU-MIMO, QoS",
227 | "stripe_price_id" : "price_1PhAgsDhcxHZPqUXh81bslrj",
228 | "price": 50
229 | },
230 | {
231 | "category": "Networking Equipment",
232 | "model": "Netgear Nighthawk AX12",
233 | "type": "Tri-band Router",
234 | "speed": "AX6000",
235 | "features": "MU-MIMO, QoS, VPN support",
236 | "stripe_price_id" : "price_1PhAgsDhcxHZPqUXh81bslrj",
237 | "price": 250
238 | },
239 | {
240 | "category": "Networking Equipment",
241 | "model": "Cisco SG350-10",
242 | "type": "Managed Switch",
243 | "ports": 16,
244 | "speed": "Gigabit",
245 | "features": "VLAN, QoS",
246 | "stripe_price_id" : "price_1PhAgsDhcxHZPqUXh81bslrj",
247 | "price": 100
248 | },
249 | {
250 | "category": "Accessories",
251 | "model": "Noctua NH-D15",
252 | "type": "CPU Cooler",
253 | "cooling_type": "Air cooling",
254 | "compatibility": "Intel and AMD",
255 | "stripe_price_id" : "price_1PhAgsDhcxHZPqUXh81bslrj",
256 | "price": 50
257 | },
258 | {
259 | "category": "Accessories",
260 | "model": "Corsair LL120",
261 | "type": "Case Fan",
262 | "size": "120mm",
263 | "features": "RGB lighting",
264 | "stripe_price_id" : "price_1PhAgsDhcxHZPqUXh81bslrj",
265 | "price": 20
266 | },
267 | {
268 | "category": "Accessories",
269 | "model": "AmazonBasics HDMI Cable",
270 | "type": "HDMI Cable",
271 | "length": "6 feet",
272 | "features": "4K support",
273 | "stripe_price_id" : "price_1PhAgsDhcxHZPqUXh81bslrj",
274 | "price": 10
275 | }
276 | ]
--------------------------------------------------------------------------------
/files/Docs.txt:
--------------------------------------------------------------------------------
1 | # TechNerds: Your One-Stop E-Commerce and IT Consulting Solution
2 |
3 | ## Overview
4 |
5 | TechNerds is a premier online store specializing in high-quality computer equipment and personalized IT consulting. Established in 2020, our mission is to provide top-notch products, exceptional customer service, competitive prices, and expert guidance. We cater to tech enthusiasts, professionals, and businesses, offering a wide range of computer components, peripherals, accessories, and tailored IT solutions.
6 |
7 | ## Services
8 |
9 | ### 1. Product Sales
10 | We offer a vast selection of computer equipment from leading brands, ensuring that our customers have access to the latest technology and reliable products.
11 |
12 | ### 2. Custom PC Building
13 | Our experts provide custom PC building services, helping customers create tailor-made systems that meet their specific needs and preferences.
14 |
15 | ### 3. Technical Support
16 | We offer comprehensive technical support, assisting customers with product installation, troubleshooting, and maintenance.
17 |
18 | ### 4. Warranty and Returns
19 | TechNerds provides warranty coverage on all products and a hassle-free return policy to ensure customer satisfaction.
20 |
21 | ### 5. Personalized IT Consulting
22 | Our team of experienced IT professionals offers personalized consulting services to help customers make informed decisions about their technology purchases and setups:
23 |
24 | **Custom Setup Consultation:**
25 | - In-depth needs assessment
26 | - Tailored hardware and software recommendations
27 | - Performance optimization advice
28 | - Scalability planning for future upgrades
29 |
30 | **Product Selection Guidance:**
31 | - Comparative analysis of available options
32 | - Budget-conscious recommendations
33 | - Use case-specific product suggestions
34 | - Compatibility checks for existing systems
35 |
36 | **Performance Optimization Consulting:**
37 | - System benchmarking and analysis
38 | - Hardware and software optimization suggestions
39 | - Cooling and power efficiency recommendations
40 |
41 | **Ergonomics and Workspace Design:**
42 | - Ergonomic peripheral recommendations
43 | - Multi-monitor setup advice
44 | - Cable management solutions
45 |
46 |
47 | ## Products
48 |
49 | ### 1. Laptops
50 | **Description:** Our laptops cater to a variety of needs, from gaming and professional work to everyday use. We offer models with powerful processors, high-resolution displays, and long battery life.
51 |
52 | **Characteristics:**
53 | - **Processors:** Latest Intel Core i5, i7, i9, and AMD Ryzen 5, 7, 9 processors
54 | - **Memory:** 8GB to 64GB of DDR4/DDR5 RAM
55 | - **Storage:** SSDs ranging from 256GB to 4TB, with optional additional HDD storage
56 | - **Displays:** Full HD, 2K, 4K, and OLED screens with sizes from 13 to 17 inches
57 | - **Graphics:** Integrated and dedicated options, including NVIDIA GeForce RTX and AMD Radeon series
58 | - **Battery Life:** Up to 20 hours, depending on the model and usage
59 | - **Additional Features:** Thunderbolt 4 ports, Wi-Fi 6E, fingerprint readers, and advanced cooling systems
60 |
61 | **Laptops Prices Range:** $500 - $3,500
62 |
63 | ### 2. Desktops
64 | **Description:** Our desktop computers are built to handle intensive tasks, from gaming and graphic design to software development and data analysis.
65 |
66 | **Characteristics:**
67 | - **Processors:** Intel Core i5, i7, i9, and AMD Ryzen 5, 7, 9 with overclocking capabilities
68 | - **Memory:** Up to 128GB of DDR4/DDR5 RAM
69 | - **Storage:** Multiple storage options including NVMe SSDs (up to 4TB) and HDDs (up to 20TB)
70 | - **Graphics:** High-end graphics cards like NVIDIA GeForce RTX 4000 series and AMD Radeon RX 7000 series
71 | - **Cooling Systems:** Liquid cooling and advanced air cooling solutions
72 | - **Expandability:** Multiple PCIe 4.0/5.0 slots, Thunderbolt 4 ports, and USB 3.2 Gen 2x2 connectivity
73 | - **Additional Features:** Tool-less design for easy upgrades, RGB lighting, and high-wattage modular power supplies
74 |
75 | **Desktops Prices Range:** $800 - $5,000
76 |
77 | ### 3. Monitors
78 | **Description:** We offer a wide range of monitors suitable for gaming, professional work, and everyday use.
79 |
80 | **Characteristics:**
81 | - **Display Types:** IPS, VA, OLED, and Mini-LED panels
82 | - **Resolutions:** Full HD, 2K, 4K, 5K, and 8K options
83 | - **Refresh Rates:** 60Hz to 360Hz for smooth visuals
84 | - **Screen Sizes:** 21 to 49 inches, including ultrawide and super ultrawide options
85 | - **Connectivity:** HDMI 2.1, DisplayPort 1.4, USB-C with power delivery
86 | - **Additional Features:** HDR support, adaptive sync technologies, KVM switches, and ergonomic stands
87 |
88 | **Monitors Prices Range:** $150 - $2,500
89 |
90 | ### 4. Keyboards
91 | **Description:** Our selection of keyboards includes both mechanical and membrane models, designed for gaming, typing, and professional use. Each keyboard offers unique features such as customizable RGB lighting and ergonomic designs to enhance your productivity and gaming experience.
92 |
93 | **Characteristics:**
94 | - **Types:** Mechanical with various switch types (Cherry MX, Razer, Logitech), membrane, and hybrid.
95 | - **Lighting:** Full RGB lighting with customizable effects and profiles.
96 | - **Designs:** Ergonomic layouts, detachable wrist rests, and compact tenkeyless options.
97 | - **Connectivity:** Wired and wireless options with Bluetooth and 2.4GHz connectivity.
98 | - **Additional Features:** Programmable macro keys, dedicated media controls, and durable keycaps.
99 |
100 | **Keyboards Prices Range:** $50 - $200
101 |
102 | ### 5. Mice
103 | **Description:** Our mice are designed for precision and comfort, catering to gamers and professionals alike. We offer a range of options including wired, wireless, and ergonomic designs to suit various preferences and needs.
104 |
105 | **Characteristics:**
106 | - **Sensor Types:** Optical and laser sensors with high DPI settings (up to 16,000 DPI).
107 | - **Designs:** Ergonomic shapes, ambidextrous options, and customizable weights.
108 | - **Buttons:** Programmable buttons with on-the-fly DPI adjustments and customizable profiles.
109 | - **Connectivity:** Wired USB, wireless with 2.4GHz and Bluetooth options.
110 | - **Additional Features:** RGB lighting, high polling rates, and durable switches rated for millions of clicks.
111 |
112 | **Mice Prices Range:** $30 - $150
113 |
114 | ### 6. Graphics Cards
115 | **Description:** Our graphics cards are perfect for gamers, graphic designers, and professionals requiring high-performance visual computing. We offer the latest models from top brands, ensuring excellent performance and reliability.
116 |
117 | **Characteristics:**
118 | - **Chipsets:** NVIDIA GeForce RTX 30 series and AMD Radeon RX 6000 series.
119 | - **Memory:** Options ranging from 4GB to 24GB of GDDR6/GDDR6X memory.
120 | - **Cooling Solutions:** Dual and triple-fan designs, liquid cooling, and advanced heat dissipation technologies.
121 | - **Connectivity:** Multiple HDMI, DisplayPort, and USB-C outputs for multi-monitor setups.
122 | - **Additional Features:** Ray tracing, AI-enhanced graphics, and overclocking capabilities.
123 |
124 | **Graphics Cards Prices Range:** $200 - $1,500
125 |
126 | ### 7. Storage Devices
127 | **Description:** Our storage solutions include both SSDs and HDDs, providing reliable and fast options for all your storage needs. We offer internal and external drives, ensuring you have the right solution for data storage and transfer.
128 |
129 | **Characteristics:**
130 | - **Types:** SATA SSDs, NVMe M.2 SSDs, and traditional HDDs.
131 | - **Capacities:** Ranging from 256GB to 2TB for SSDs and 1TB to 4TB for HDDs.
132 | - **Speeds:** High read/write speeds for SSDs (up to 3500MB/s) and large cache sizes for HDDs.
133 | - **Form Factors:** 2.5-inch, 3.5-inch, and M.2 form factors for various applications.
134 | - **Durability:** Shock-resistant, vibration-resistant, and high MTBF ratings.
135 |
136 | **Storage Devices Prices Range:** $50 - $500
137 |
138 | ### 8. Networking Equipment
139 | **Description:** Our networking equipment includes routers, switches, and Wi-Fi extenders, designed to provide fast and reliable internet connectivity for homes and offices. We offer solutions that cater to both basic and advanced networking needs.
140 |
141 | **Characteristics:**
142 | - **Routers:** Dual-band and tri-band routers with speeds up to 10Gbps, MU-MIMO, and QoS features.
143 | - **Switches:** Managed and unmanaged switches with multiple ports (5, 8, 16, 24).
144 | - **Wi-Fi Extenders:** Range extenders with seamless roaming and mesh networking capabilities.
145 | - **Security:** Advanced security features including firewalls, VPN support, and parental controls.
146 | - **Additional Features:** Easy setup, mobile app control, and firmware updates.
147 |
148 | **Networking Equipment Prices Range:** $20 - $300
149 |
150 | ### 9. Accessories
151 | **Description:** We offer a wide range of computer accessories to enhance your computing experience. From cooling solutions to cables and adapters, our accessories are designed for compatibility and reliability.
152 |
153 | **Characteristics:**
154 | - **Cooling Solutions:** CPU coolers, case fans, and thermal paste for efficient heat management.
155 | - **Cables:** HDMI, DisplayPort, Ethernet, USB, and power cables in various lengths and specifications.
156 | - **Adapters:** USB hubs, docking stations, and converters for various connectivity needs.
157 | - **Additional Features:** High-quality materials, durability, and compatibility with multiple devices.
158 |
159 | **Accessories Prices Range:** $10 - $100
160 |
161 | ## Frequently Asked Questions (FAQ)
162 |
163 | ## General Questions
164 |
165 | **Q1: What is TechNerds?**
166 | **A:** TechNerds is an online store that specializes in selling high-quality computer equipment. We offer a wide range of products, including laptops, desktops, monitors, keyboards, mice, graphics cards, storage devices, networking equipment, and accessories.
167 |
168 | **Q2: How can I contact TechNerds customer support?**
169 | **A:** You can contact our customer support team by phone at +1-800-TECH-123, by email at support@technerds.com, or through our live chat on the website. Our business hours are Monday to Friday from 9 AM to 6 PM, and Saturday from 10 AM to 4 PM.
170 |
171 | **Q3: Where is TechNerds located?**
172 | **A:** Our headquarters is located at 1234 Tech Avenue, Silicon Valley, CA, 94043, USA.
173 |
174 | ## Product Questions
175 |
176 | **Q4: Do you offer warranties on your products?**
177 | **A:** Yes, we provide warranty coverage on all our products. The warranty period and terms may vary depending on the product and manufacturer. Please refer to the product description for specific warranty details.
178 |
179 | **Q5: Can I customize a desktop or laptop before purchasing?**
180 | **A:** Yes, we offer custom PC building services. You can choose the components you want, and our experts will assemble the system for you. Contact our customer support team for assistance with custom builds.
181 |
182 | **Q6: What types of payment methods do you accept?**
183 | **A:** We accept various payment methods, including credit cards (Visa, MasterCard, American Express), PayPal, and bank transfers.
184 |
185 | ## Shipping and Returns
186 |
187 | **Q7: Do you ship internationally?**
188 | **A:** Currently, we only ship within the United States. We are working on expanding our shipping options to international destinations in the near future.
189 |
190 | **Q8: How long does it take to receive my order?**
191 | **A:** Delivery times vary depending on your location and the shipping method selected. Standard shipping usually takes 3-7 business days. Expedited shipping options are also available at checkout.
192 |
193 | **Q9: What is your return policy?**
194 | **A:** We offer a hassle-free return policy. If you are not satisfied with your purchase, you can return it within 30 days of receiving the order for a full refund or exchange. The product must be in its original condition and packaging. Please contact our customer support team to initiate a return.
195 |
196 | ## Technical Support
197 |
198 | **Q10: How can I get technical support for a product?**
199 | **A:** You can reach out to our technical support team via phone, email, or live chat. Our team is available to assist you with product installation, troubleshooting, and maintenance.
200 |
201 | **Q11: Do you provide support for software issues?**
202 | **A:** Yes, our technical support team can assist with software issues related to the products purchased from TechNerds. This includes help with drivers, software installation, and basic troubleshooting.
203 |
204 | **Q12: Do you offer ongoing support after I purchase a custom setup?**
205 | A: Yes, we provide ongoing support for all our customers, including those who purchase custom setups. Our technical support team is available to assist with any issues, questions, or optimization needs you may have after your purchase.
206 |
207 | ## Account and Orders
208 |
209 | **Q13: How do I create an account on your website?**
210 | **A:** To create an account, click on the "Sign Up" button on the top right corner of our website. Fill in the required information, and you'll be ready to start shopping.
211 |
212 | **Q14: How can I track my order?**
213 | **A:** Once your order is shipped, you will receive a tracking number via email. You can use this number to track your order on the carrier's website. Additionally, you can log in to your TechNerds account and view the status of your order under "My Orders."
214 |
215 | **Q15: Can I modify or cancel my order after it has been placed?**
216 | **A:** If you need to modify or cancel your order, please contact our customer support team as soon as possible. If the order has not yet been processed, we will do our best to accommodate your request.
217 |
218 | ## Consulting
219 |
220 | **Q16: How does your personalized IT consulting service work?**
221 | A: Our IT consulting service begins with a one-on-one consultation where we assess your needs, budget, and goals. We then provide tailored recommendations for hardware, software, and system configurations. Our experts guide you through the selection process, ensuring you make informed decisions that align with your requirements.
222 |
223 | **Q17: Can you help me choose the best components for a custom PC build?**
224 | A: Absolutely! Our custom PC building consultation service is designed to help you select the optimal components for your needs. We consider factors such as your budget, intended use (e.g., gaming, content creation, office work), and future upgrade plans to recommend the best possible configuration.
225 |
226 | **Q18: I'm not tech-savvy. Can you help me choose the right laptop for my needs?**
227 | A: Of course! Our product selection guidance service is perfect for customers who aren't sure which product is best for them. We'll ask you questions about your intended use, budget, and preferences, then provide clear, jargon-free recommendations tailored to your needs.
--------------------------------------------------------------------------------