Skip to main content

XeedChatBot

How to Use

  • Load the dataframe
  • initialize the XeedChatBot Class

XeedChatBot

Initializes the Chat Bot

Args

df:        Pandas DataFrame object of the data to be analyzed. Also accepts a list of DataFrame
          Only supports .csv, .xlsx, .parquet, and .orc file formats.
db:        Database Object that can be analyzed. If df is used, db should be empty
llm:        Optional. Name of the Large Language Model to be used.
prompt:      Optional. Instructions for the model.

Returns

Chatbot Agent

Sample Usage using pandas DataFrame

import os
import pandas as pd

from xeedchatbot import XeedChatBot

#set the API KEY
os.environ["OPENAI_API_KEY"] = OPEN_API_KEY

df = pd.read_csv('sample_data/financial_data.csv')
prompt = f"You are an expert on the company's finances. By default the company you will provide information for is Xurpas.\
        Please make sure you complete the objective above with the following rules:\
        1/ Your job is to first breakdown the topic into relevant questions for understanding the topic in detail. You should have at max only 3 questions not more than that, in case there are more than 3 questions consider only the first 3 questions and ignore the others.\
        2/ You should use finance_tool to get more information about the topic. You are allowed to use the search tool only 3 times in this process.\
        3/ If asked for multiple items, query them one by one using the tools provided.\
        4/ If not asked for a specific time period, assume the year 2024.\
        5/ Aggregate all the answers that you can get on this topic.\
        6/ Ouput DataFrame data as an HTML table."

chatbot = XeedChatBot(df=df, prompt=prompt)
agent = chatbot.initialize_chatbot()

msg = agent.invoke("What is the EBITDA for Xurpas for the year 2024")

print(msg['output'])

*The EBITDA for Xurpas is $50 million.*

Metadata

Release files for xeedchatbot 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xeedchatbot 0.0.1
File Size Uploaded
xeedchatbot-0.0.1.tar.gz 2.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for xeedchatbot 0.0.1
File Interpreter ABI Platform
xeedchatbot-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 4.9 kB

Release files / xeedchatbot-0.0.1.tar.gz

Download URL xeedchatbot-0.0.1.tar.gz
Size 2.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e20b2c5f58043d0914e5c7781e797598e34c22bb17baf8d2232630f727b02017
BLAKE2b-256 checksum
How to use checksums
786a76ab2aa6f94cb2323fa557576297e1e5cb81dcb35de9fe7919f4a277e833
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.3

Release files / xeedchatbot-0.0.1-py3-none-any.whl

Download URL xeedchatbot-0.0.1-py3-none-any.whl
Size 2.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
27c29933e12ce0b06804bc469d5efc55fd359e3d951ef8a1e4b01337a831e293
BLAKE2b-256 checksum
How to use checksums
94a4aacbfc52ef2acbcea0fc15233996470f32cfc5a51cdaf9d9a699c870118a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page