Spaces:
Build error
Build error
Use gpt-3.5-turbo
Browse files- .gitignore +13 -1
- README.md +1 -0
- app.py +1 -1
- index.json +0 -0
- indexed_documents/Hugoz Project.txt +5 -9
- requirements.txt +2 -1
- responses.json +0 -0
- responses.txt +120 -0
- {indexed_documents β sample_documents}/DIvo Summary.txt +0 -0
- {indexed_documents β sample_documents}/Hugoz by Wayne Lim.txt +0 -0
- {indexed_documents β sample_documents}/IQI Global also known as Juwai IQI.txt +0 -0
- {indexed_documents β sample_documents}/MyKey - Ceylonz 3 % GRR (Word File).docx +0 -0
- {indexed_documents β sample_documents}/Mykey Global Profile.txt +0 -0
- {indexed_documents β sample_documents}/Ninja-Selling-Booklet-01-01-08.pdf +0 -0
- sample_documents/README.md +53 -0
- {indexed_documents β sample_documents}/The New Trend in Short Term Rental .txt +0 -0
- {indexed_documents β sample_documents}/The story of Silver Pink.txt +0 -0
- {indexed_documents β sample_documents}/TonyYap.txt +0 -0
- trained indexes/index3.json +0 -0
.gitignore
CHANGED
@@ -1 +1,13 @@
|
|
1 |
-
.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.vercel
|
2 |
+
*.log
|
3 |
+
*.pyc
|
4 |
+
__pycache__
|
5 |
+
|
6 |
+
# Environments
|
7 |
+
.env
|
8 |
+
.venv
|
9 |
+
env/
|
10 |
+
venv/
|
11 |
+
ENV/
|
12 |
+
env.bak/
|
13 |
+
venv.bak/
|
README.md
CHANGED
@@ -10,3 +10,4 @@ pinned: false
|
|
10 |
---
|
11 |
|
12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
10 |
---
|
11 |
|
12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
13 |
+
gpt-3.5-turbo
|
app.py
CHANGED
@@ -38,7 +38,7 @@ prompt_helper = PromptHelper(
|
|
38 |
)
|
39 |
|
40 |
llm_predictor = LLMPredictor(
|
41 |
-
llm=OpenAI(temperature=0.7, model_name="
|
42 |
)
|
43 |
|
44 |
service_context = ServiceContext.from_defaults(
|
|
|
38 |
)
|
39 |
|
40 |
llm_predictor = LLMPredictor(
|
41 |
+
llm=OpenAI(temperature=0.7, model_name="gpt-3.5-turbo", max_tokens=num_outputs)
|
42 |
)
|
43 |
|
44 |
service_context = ServiceContext.from_defaults(
|
index.json
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
indexed_documents/Hugoz Project.txt
CHANGED
@@ -43,13 +43,11 @@ Updated @ 29/12/2022
|
|
43 |
|
44 |
Booking Fee: RM500
|
45 |
|
46 |
-
Loan Buyer Rebate: 9% rebate upon SPA
|
47 |
|
48 |
Cash Buyer Rebate Structure
|
49 |
-
Total : 9% rebate
|
50 |
-
|
51 |
-
3% rebate upon Stage 2A
|
52 |
-
1% rebate upon VP
|
53 |
|
54 |
|
55 |
Optional Package
|
@@ -63,8 +61,6 @@ Promotion for first 200 units - Free Set Up Package
|
|
63 |
Please fill in the Mana Mana Hospitality Registration Form in Atlas and submit to Exsim upon booking. Mana Mana Hospitality will contact the client to explain further
|
64 |
Please write in to [email protected] on confirmation Discount / Rebate Mana Mana package to arrange the signing arrangement
|
65 |
For further enquiries about the profit sharing package, you may email to [email protected] / [email protected]
|
66 |
-
Discount / Rebate
|
67 |
-
|
68 |
|
69 |
|
70 |
For Exsim differential sum deferment/installment plan, please take note on the following T&C
|
@@ -145,8 +141,8 @@ IQI Incentive and Trips: Yes
|
|
145 |
|
146 |
Commission Payout to agents:
|
147 |
Loan buyer: Full claim within 5 working days once SPA signed, LA signed and 1st 10% payment made (100%)
|
148 |
-
Cash buyer: First
|
149 |
-
Balance
|
150 |
|
151 |
*Note : This info is for your reference only; it may change accordingly without prior notice
|
152 |
Please be informed for Exsim comm payment 5 working days, it will be counted once ALL documents have received by Exsim.
|
|
|
43 |
|
44 |
Booking Fee: RM500
|
45 |
|
46 |
+
Loan Buyer Rebate: Total : 9% rebate upon SPA
|
47 |
|
48 |
Cash Buyer Rebate Structure
|
49 |
+
Total : 9% rebate (5% rebate upon SPA, 3% rebate upon Stage 2A, 1% rebate upon VP)
|
50 |
+
|
|
|
|
|
51 |
|
52 |
|
53 |
Optional Package
|
|
|
61 |
Please fill in the Mana Mana Hospitality Registration Form in Atlas and submit to Exsim upon booking. Mana Mana Hospitality will contact the client to explain further
|
62 |
Please write in to [email protected] on confirmation Discount / Rebate Mana Mana package to arrange the signing arrangement
|
63 |
For further enquiries about the profit sharing package, you may email to [email protected] / [email protected]
|
|
|
|
|
64 |
|
65 |
|
66 |
For Exsim differential sum deferment/installment plan, please take note on the following T&C
|
|
|
141 |
|
142 |
Commission Payout to agents:
|
143 |
Loan buyer: Full claim within 5 working days once SPA signed, LA signed and 1st 10% payment made (100%)
|
144 |
+
Cash buyer: First 50% of the commission will be issued once SPA and LA are signed and 1st 10% payment is made
|
145 |
+
Balance 50% of the commission will be issued within 3-8 months from the first comm received
|
146 |
|
147 |
*Note : This info is for your reference only; it may change accordingly without prior notice
|
148 |
Please be informed for Exsim comm payment 5 working days, it will be counted once ALL documents have received by Exsim.
|
requirements.txt
CHANGED
@@ -1,3 +1,4 @@
|
|
1 |
llama_index
|
2 |
langchain
|
3 |
-
python-dotenv
|
|
|
|
1 |
llama_index
|
2 |
langchain
|
3 |
+
python-dotenv
|
4 |
+
Flask==2.2.2
|
responses.json
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
responses.txt
CHANGED
@@ -1535,3 +1535,123 @@ Number...
|
|
1535 |
------------------------
|
1536 |
|
1537 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1535 |
------------------------
|
1536 |
|
1537 |
|
1538 |
+
2023-04-09
|
1539 |
+
Input: Talk about Custom-knowledge based querying with chatgpt
|
1540 |
+
Response:
|
1541 |
+
Custom-knowledge based querying with ChatGPT is a Python backend service that is designed to allow users to query a database of knowledge using natural language processing with the help of a pre-created index. This index is stored in an `index.json` file on Firebase Storage which ChatGPT uses to generate responses to the user's query. This allows users to access knowledge without needing to write complex code or search through large databases, making knowledge more accessible.
|
1542 |
+
|
1543 |
+
Source:> Source (Doc id: 8e5837ea-d094-4ab0-9233-a60c19208904):
|
1544 |
+
|
1545 |
+
Custom-Knowledge-Based Querying with ChatGPT
|
1546 |
+
|
1547 |
+
This project is a Python backend service that run...
|
1548 |
+
------------------------
|
1549 |
+
|
1550 |
+
|
1551 |
+
2023-04-09
|
1552 |
+
Input: Talk about Custom-knowledge based querying with chatgpt. Elaborate in details. Imagine you want to market this to many people so they can start using this code.
|
1553 |
+
Response:
|
1554 |
+
Custom-Knowledge-Based Querying with ChatGPT is a Python backend service that makes it easy for developers to build applications that generate responses based on a custom index. This index is stored in a Firebase Storage file called `index.json`, and it is used as a Llama index for ChatGPT to generate responses.
|
1555 |
+
|
1556 |
+
With this technology, developers can create natural language interfaces for their applications that are more engaging and user friendly. By leveraging the power of ChatGPT, developers can build applications that understand the user's intent and provide more accurate and meaningful responses. This technology can be used to create chatbots, virtual assistants, and more.
|
1557 |
+
|
1558 |
+
Using Custom-Knowledge-Based Querying with ChatGPT is simple and straightforward. Developers can use the provided Python backend service to upload their index file to Firebase Storage and quickly get their applications up and running. The service can also be used to modify and update the index file as needed.
|
1559 |
+
|
1560 |
+
With Custom-Knowledge-Based Querying with ChatGPT, developers can create applications that are more intelligent and interactive. They can build applications that understand the user's intent and provide accurate and meaningful responses that are tailored to the user's needs. This technology can help developers create applications that are more engaging and user friendly, and it is an excellent tool for creating natural language interfaces for their applications.
|
1561 |
+
|
1562 |
+
Source:> Source (Doc id: 8e5837ea-d094-4ab0-9233-a60c19208904):
|
1563 |
+
|
1564 |
+
Custom-Knowledge-Based Querying with ChatGPT
|
1565 |
+
|
1566 |
+
This project is a Python backend service that run...
|
1567 |
+
------------------------
|
1568 |
+
|
1569 |
+
|
1570 |
+
2023-04-09
|
1571 |
+
Input: Who is Dave Chong
|
1572 |
+
Response: Dave Chong is the Group Vice President of IQI Global, a company that aims to transform lives through personal development and financial success. He has a background in civil engineering and project management and has grown his team at IQI to a 900-strong army, achieving RM 1 billion in sales. He believes in lifelong learning and creating sustainable business systems for wealth creation.
|
1573 |
+
|
1574 |
+
Source:> Source (Doc id: f25a04d6-f8ae-4591-8cb5-15c103471a0f):
|
1575 |
+
Dave Chong Group Vice President IQI Holdings Sdn Bhd Lifeβs achievement is all about perception....
|
1576 |
+
------------------------
|
1577 |
+
|
1578 |
+
|
1579 |
+
2023-04-09
|
1580 |
+
Input: Who is Dave Chong. Summarise in points form.
|
1581 |
+
Response: - Dave Chong is the Group Vice President of IQI Holdings Sdn Bhd.
|
1582 |
+
- He believes that life's achievement is all about perception and values personal development and financial success.
|
1583 |
+
- Dave values constant learning and believes in wealth creation through building sustainable business systems.
|
1584 |
+
- He has a Civil Engineering Master First Class Honours from Imperial College in London and worked in the city for two years as a Civil and Structural Engineer.
|
1585 |
+
- Upon returning to Malaysia, he started-up a couple of businesses, one of which grew into a multi-million-dollar company.
|
1586 |
+
- He became a Real Estate Negotiator at IQI Holdings in 2014 and eventually grew a team to a 900-strong army that achieved RM 1 billion in sales.
|
1587 |
+
- Dave's vision is to help as many people as possible to achieve their financial and life goals.
|
1588 |
+
|
1589 |
+
Source:> Source (Doc id: f25a04d6-f8ae-4591-8cb5-15c103471a0f):
|
1590 |
+
Dave Chong Group Vice President IQI Holdings Sdn Bhd Lifeβs achievement is all about perception....
|
1591 |
+
------------------------
|
1592 |
+
|
1593 |
+
|
1594 |
+
2023-04-09
|
1595 |
+
Input: Who is Dave Chong. Summarise in points form. In more details
|
1596 |
+
Response: Dave Chong is the Group Vice President of IQI Holdings Sdn Bhd. He believes that life achievement is all about perception and that success comes from improving oneself and creating value for others. He values personal development, financial freedom, and life transformation. Dave graduated from Imperial College in London with a Civil Engineering Master First Class Honours and worked in the city for two years before taking on international oil and gas engineering projects in Australia and India. He started up several businesses before joining IQI Holdings as a Real Estate Negotiator in 2014. He founded Eliteone Team and grew it to 100 individuals, achieving RM 1 billion in sales. He is now responsible for helping people achieve their financial and life goals.
|
1597 |
+
|
1598 |
+
Source:> Source (Doc id: f25a04d6-f8ae-4591-8cb5-15c103471a0f):
|
1599 |
+
Dave Chong Group Vice President IQI Holdings Sdn Bhd Lifeβs achievement is all about perception....
|
1600 |
+
------------------------
|
1601 |
+
|
1602 |
+
|
1603 |
+
2023-04-09
|
1604 |
+
Input: Summarise D Velada, in points form
|
1605 |
+
Response: - D Velada is a project with a pending APDL launch date
|
1606 |
+
- The land area is 2.29 acres with 1 block and 508 units
|
1607 |
+
- There are 42 levels and the property is leasehold under HDA
|
1608 |
+
- The completion date is 48 months after APDL obtained
|
1609 |
+
- Maintenance fee and sinking fund are to be confirmed
|
1610 |
+
- There are 4+1 service lifts and 1 carpark podium lift
|
1611 |
+
- Units per floor average 14 and most come with 2 single car parks
|
1612 |
+
- Sales chart remarks include additional premiums for certain units and floor levels
|
1613 |
+
- Multi-tier security is in place and the title is commercial under HDA
|
1614 |
+
- The size is 1,012sf with a price range starting from RM776,400
|
1615 |
+
- There is a booking fee of RM300 payable to Mana Mana Hospitality
|
1616 |
+
- Rebate packages are available for loan and cash buyers
|
1617 |
+
- Extra rebates are available for Bumi buyers
|
1618 |
+
- The property is bare unit with only aircon and bathroom accessories provided
|
1619 |
+
- Commission payouts are available for loan and cash buyers with certain conditions
|
1620 |
+
- Show unit type is Type A with a commission deduction for referral fees and repeat buyers.
|
1621 |
+
|
1622 |
+
Source:> Source (Doc id: 026726a7-f9f5-43d8-83d7-b56492d3ad99): D Velada Project Summary:
|
1623 |
+
|
1624 |
+
Launch Date: Pending APDL
|
1625 |
+
Land Area: 2.29 acres
|
1626 |
+
Number of Blocks: 1 bl...
|
1627 |
+
------------------------
|
1628 |
+
|
1629 |
+
|
1630 |
+
2023-04-09
|
1631 |
+
Input: Write a marketing script for D Velada, as a property agent.
|
1632 |
+
Response: Welcome to D Velada, a luxurious residential development located on a 2.29-acre land area, offering 508 units spread over 42 levels. This leasehold property boasts a multi-tiered security system and is commercial under HDA title.
|
1633 |
+
|
1634 |
+
The units at D Velada are spacious, with an average of 14 units per floor, and most of them come with 2 single car parks. The parking options are diverse, with different units offering one set tandem and one single car park, or even two single and one single car park.
|
1635 |
+
|
1636 |
+
As a property agent, I am pleased to inform you that we have an updated sales package available for you. Our price range starts from RM776,400 (gross), with a price per square foot of RM767psf (gross). We also have a loan buyer rebate package, with an 8% rebate upon SPA.
|
1637 |
+
|
1638 |
+
If you are a cash buyer, you can enjoy an extra rebate of 0.5% upon VP. However, if you are taking Schedule J installment plan, you will not be entitled to this rebate. If you are a Bumi Buyer, we offer an extra 2% rebate upon Stage 2B.
|
1639 |
+
|
1640 |
+
At D Velada, we understand that every buyer has different needs and preferences. Therefore, we offer a variety of sales chart remarks, including additional RM 4,000 for orientation premium, RM500 per floor jump, RM 3,000 for unit 08, and additional RM 2,000 for corner units.
|
1641 |
+
|
1642 |
+
We also offer a Mana Mana Hospitality voucher, which can be converted to a premium rebate of RM300 on the balance payment during SPA signing. The voucher is refundable subject to the return of unused/undamaged original voucher to the issuer with appropriate approval granted. It is valid until 31st December 2023 and can be redeemed at Ceylonz Suites @ Bukit Ceylon, Scarletz Suites @ KL City Centre, Mossaz, Millerz Square @ Old Klang Road or Expressionz Professional Suites @ Tun Razak (subject to availability).
|
1643 |
+
|
1644 |
+
At D Velada, we offer a bare unit with only air conditioning in the living room and master bedroom, and bathroom accessories. However, we guarantee a luxurious living experience that will make you feel at home.
|
1645 |
+
|
1646 |
+
If you are interested in D Velada, please do not hesitate to contact us. We also offer IQI incentives and trips, in addition to commission payouts. Please note that commission payouts may be subject to change without prior notice.
|
1647 |
+
|
1648 |
+
Thank you for considering D Velada as your next home. We look forward to hearing from you soon!
|
1649 |
+
|
1650 |
+
Source:> Source (Doc id: 026726a7-f9f5-43d8-83d7-b56492d3ad99): D Velada Project Summary:
|
1651 |
+
|
1652 |
+
Launch Date: Pending APDL
|
1653 |
+
Land Area: 2.29 acres
|
1654 |
+
Number of Blocks: 1 bl...
|
1655 |
+
------------------------
|
1656 |
+
|
1657 |
+
|
{indexed_documents β sample_documents}/DIvo Summary.txt
RENAMED
File without changes
|
{indexed_documents β sample_documents}/Hugoz by Wayne Lim.txt
RENAMED
File without changes
|
{indexed_documents β sample_documents}/IQI Global also known as Juwai IQI.txt
RENAMED
File without changes
|
{indexed_documents β sample_documents}/MyKey - Ceylonz 3 % GRR (Word File).docx
RENAMED
File without changes
|
{indexed_documents β sample_documents}/Mykey Global Profile.txt
RENAMED
File without changes
|
{indexed_documents β sample_documents}/Ninja-Selling-Booklet-01-01-08.pdf
RENAMED
File without changes
|
sample_documents/README.md
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Custom-Knowledge-Based Querying with ChatGPT
|
2 |
+
|
3 |
+
This project is a Python backend service that runs on Google Cloud Functions. It utilizes ChatGPT to provide custom knowledge-based querying by reading an `index.json` file from Firebase Storage and using it as a Llama index for generating responses.
|
4 |
+
|
5 |
+
## Features
|
6 |
+
|
7 |
+
- Reads `index.json` file from Firebase Storage and uses it as a Llama index
|
8 |
+
- Provides custom knowledge-based querying powered by ChatGPT
|
9 |
+
- Accepts `input_text` as an API parameter and generates a relevant response along with the source of the information
|
10 |
+
|
11 |
+
## Installation & Deployment
|
12 |
+
|
13 |
+
This project is designed to be deployed as a Google Cloud Function. Follow the official [Google Cloud Functions documentation](https://cloud.google.com/functions/docs) to set up and deploy the function.
|
14 |
+
|
15 |
+
Deploy using script below in the command line:
|
16 |
+
|
17 |
+
`gcloud functions deploy hello_world --runtime python310 --trigger-http --allow-unauthenticated --entry-point hello_world --source . --set-env-vars OPENAI_API_KEY=YOUR_SECRET_KEY --memory 1024MB`
|
18 |
+
|
19 |
+
Change YOUR_SECRET_KEY to your own OpenAI secret key
|
20 |
+
|
21 |
+
### Prerequisites
|
22 |
+
|
23 |
+
- A Google Cloud account with billing enabled
|
24 |
+
- Firebase Storage configured with an `index.json` file
|
25 |
+
- Google Cloud SDK installed on your local machine
|
26 |
+
- OpenAI API key
|
27 |
+
|
28 |
+
### Setup
|
29 |
+
|
30 |
+
1. Clone this repository.
|
31 |
+
2. Install the required dependencies with `pip install -r requirements.txt`.
|
32 |
+
3. Set the `OPENAI_API_KEY` environment variable in your Google Cloud Function configuration.
|
33 |
+
4. Configure the `storageBucket` option in `firebase_admin.initialize_app()` to match your Firebase Storage bucket.
|
34 |
+
5. Deploy the function to Google Cloud Functions following their documentation.
|
35 |
+
|
36 |
+
## Usage
|
37 |
+
|
38 |
+
Make a GET request to the deployed Cloud Function with an `input_text` query parameter. The response will be a JSON object containing a generated response and the source of the information.
|
39 |
+
|
40 |
+
## http
|
41 |
+
|
42 |
+
GET https://<your-cloud-function-url>/hello_world?input_text=<your-query-text>
|
43 |
+
|
44 |
+
## Contributing
|
45 |
+
|
46 |
+
Fork the project.
|
47 |
+
Create a new branch (git checkout -b feature_branch).
|
48 |
+
Commit your changes (git commit -am 'Add a new feature').
|
49 |
+
Push to the branch (git push origin feature_branch).
|
50 |
+
Create a new Pull Request.
|
51 |
+
|
52 |
+
## License
|
53 |
+
This project is licensed under the MIT License.
|
{indexed_documents β sample_documents}/The New Trend in Short Term Rental .txt
RENAMED
File without changes
|
{indexed_documents β sample_documents}/The story of Silver Pink.txt
RENAMED
File without changes
|
{indexed_documents β sample_documents}/TonyYap.txt
RENAMED
File without changes
|
trained indexes/index3.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|