247 |
├── .dockerignore
├── .env.example
├── .eslintrc.json
├── .gitignore
├── README.md
├── data
├── args.json
├── docstore.json
└── hnswlib.index
├── graphqlspec
└── fhaincomelimits.md
├── ingest.ts
├── next.config.js
├── package.json
├── pages
├── _app.tsx
├── _document.tsx
├── api
│ ├── chat-stream.ts
│ ├── chat.ts
│ └── util.ts
└── index.tsx
├── playwright-report
└── index.html
├── public
├── android-chrome-192x192.png
├── android-chrome-512x512.png
├── apple-touch-icon.png
├── chatIcon.png
├── favicon-16x16.png
├── favicon-32x32.png
├── favicon.ico
├── og-image.svg
├── robots.txt
├── site.webmanifest
└── usericon.png
├── styles
├── Home.module.css
└── globals.css
├── tsconfig.json
├── vercel.json
└── yarn.lock
/.dockerignore:
--------------------------------------------------------------------------------
1 | **/.classpath
2 | **/.dockerignore
3 | **/.env
4 | **/.git
5 | **/.gitignore
6 | **/.project
7 | **/.settings
8 | **/.toolstarget
9 | **/.vs
10 | **/.vscode
11 | **/*.*proj.user
12 | **/*.dbmdl
13 | **/*.jfm
14 | **/bin
15 | **/charts
16 | **/docker-compose*
17 | **/compose*
18 | **/Dockerfile*
19 | **/node_modules
20 | **/npm-debug.log
21 | **/obj
22 | **/secrets.dev.yaml
23 | **/values.dev.yaml
24 | LICENSE
25 | README.md
26 |
--------------------------------------------------------------------------------
/.env.example:
--------------------------------------------------------------------------------
1 | OPENAI_API_KEY=""
--------------------------------------------------------------------------------
/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "next/core-web-vitals"
3 | }
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # next.js
12 | /.next/
13 | /out/
14 |
15 | # production
16 | /build
17 |
18 | # misc
19 | .DS_Store
20 | *.pem
21 |
22 | # debug
23 | npm-debug.log*
24 | yarn-debug.log*
25 | yarn-error.log*
26 | .pnpm-debug.log*
27 |
28 | # local env files
29 | .env*.local
30 |
31 | # Used env file
32 | .env
33 |
34 | # vercel
35 | .vercel
36 |
37 | # typescript
38 | *.tsbuildinfo
39 | next-env.d.ts
40 |
41 | docs/
42 |
43 |
44 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # **Chat your Data**
2 |
3 | Chat your Data is an application built using Next.js, React, and OpenAI. This project allows users to communicate with an AI-based chatbot that provides relevant answers to users' queries. The application uses natural language processing (NLP) technology to understand users' queries and provide accurate responses.
4 |
5 | ## **Installation**
6 |
7 | Before installing Chat your Data, ensure that Node.js is installed on your system. After installing Node.js, follow the steps below to install the application:
8 |
9 | 1. Clone the project repository from GitHub.
10 | 2. Navigate to the project directory using a terminal or command prompt.
11 | 3. Run **`yarn install`** to install the project dependencies.
12 | 4. Create a **`.env`** file in the project root directory and configure the environment variables as required.
13 |
14 |
15 | First, create a new `.env` file from `.env.example` and add your OpenAI API key found [here](https://platform.openai.com/account/api-keys).
16 |
17 | ```bash
18 | cp .env.example .env
19 | ```
20 |
21 | ## **Known Issues**
22 |
23 | Need to keep LangChain version 0.0.22. Anything higher has refactored code and breaks. Working on Refactoring for ChatModel
24 |
25 | ### **Data Ingestion**
26 |
27 | Data ingestion happens in two steps.
28 |
29 | First, you should download the book / source and format it into something readable and converted it into `md` format. Add that source to the project folder and update `FILENAME` in `ingest.ts` to match the filename.
30 |
31 | Next, install dependencies and run the ingestion script:
32 |
33 | ```bash
34 | yarn && yarn ingest
35 | ```
36 |
37 | This will parse the data, split text, create embeddings, store them in a vectorstore, and
38 | then save it to the `data/` directory.
39 |
40 | We save it to a directory because we only want to run the (expensive) data ingestion process once.
41 |
42 | The Next.js server relies on the presence of the `data/` directory. Please
43 | make sure to run this before moving on to the next step.
44 |
45 | ## **Usage**
46 |
47 | To start the Chat your Data application, run the following command in the terminal:
48 |
49 | ```
50 |
51 | yarn dev
52 |
53 | ```
54 |
55 | Once the application is started, you can access it by navigating to **`http://localhost:3000`** in your web browser.
56 |
57 | ## **Scripts**
58 |
59 | The following scripts are available in the project:
60 |
61 | - **`dev`**: Start the development server.
62 | - **`build`**: Build the production-ready application.
63 | - **`start`**: Start the production-ready application.
64 | - **`lint`**: Lint the project files using ESLint.
65 | - **`download`**: Download data required for the chatbot to function.
66 | - **`ingest`**: Ingest the downloaded data into the chatbot.
67 |
68 | ## **Dependencies**
69 |
70 | The following dependencies are required to run the Hometown Chatbot application:
71 |
72 | - **`@emotion/react`**
73 | - **`@emotion/styled`**
74 | - **`@microsoft/fetch-event-source`**
75 | - **`@mui/material`**
76 | - **`dotenv`**
77 | - **`hnswlib-node`**
78 | - **`langchain`**
79 | - **`next`**
80 | - **`openai`**
81 | - **`react`**
82 | - **`react-dom`**
83 | - **`react-markdown`**
84 | - **`remark-gfm`**
85 | - **`sharp`**
86 | - **`ws`**
87 |
88 | The following devDependencies are required for development purposes:
89 |
90 | - **`@types/adm-zip`**
91 | - **`@types/node`**
92 | - **`@types/react`**
93 | - **`@types/react-dom`**
94 | - **`@types/ws`**
95 | - **`cohere-ai`**
96 | - **`ts-node`**
97 | - **`tsx`**
98 | - **`typescript`**
99 |
100 | ## **Contributing**
101 |
102 | Contributions to Chat your Data are welcome. If you find any bugs or issues, please raise them on the project's GitHub repository. You can also contribute to the project by submitting pull requests.
103 |
104 | ## **License**
105 |
106 | Hometown Chatbot is open-source software licensed under the **[MIT license](https://opensource.org/licenses/MIT)**.
107 |
108 | ## **Deploying the server**
109 |
110 | Depolyed to Vercel
111 |
112 | ## **Inspirations**
113 |
114 | This repo borrows heavily from
115 |
116 | - [ChatLangChain](https://github.com/hwchase17/chat-langchain) - for the backend and data ingestion logic
117 | - [LangChain Chat NextJS](https://github.com/zahidkhawaja/langchain-chat-nextjs) - for the frontend.
118 | - [Chat Langchainjs](https://github.com/sullivan-sean/chat-langchainjs) - Backend and Data ingestion
119 |
120 | ## **How To Run on Your Example**
121 |
122 | If you'd like to chat your own data, you need to:
123 |
124 | 1. Set up your own ingestion pipeline, and create a similar `data/` directory with a vectorstore in it.
125 | 2. Change the prompt used in `pages/api/util.ts` - right now this tells the chatbot to only respond to questions about LangChain, so in order to get it to work on your data you'll need to update it accordingly.
126 |
127 | The server should work just the same 😄
128 |
--------------------------------------------------------------------------------
/data/args.json:
--------------------------------------------------------------------------------
1 | {"space":"ip","numDimensions":1536}
--------------------------------------------------------------------------------
/data/docstore.json:
--------------------------------------------------------------------------------
1 | [["0",{"pageContent":"### FHA Loan Requirements:\n\nBorrowers who are interested in buying a home with an FHA loan with the low down payment amount of 3.5% must have a minimum FICO score of 580 to qualify. A lower credit score than 580 doesn’t necessarily exclude you from FHA loan eligibility if you have a minimum down payment of 10%.\nThere are other requirements for FHA loans in addition to credit score and certain down payment amount. Here is the complete list of FHA loan requirements, which are set by the Federal Housing Administration:\n\nFICO® score at least 580 = 3.5% down payment.\nFICO® score between 500 and 579 = 10% down payment.\nMIP (Mortgage Insurance Premium ) is required.\nDebt-to-Income Ratio < 43%.\nThe home must be the borrower's primary residence.\nBorrower must have steady income and proof of employment.\n\n### 1) Steady Employment History\nBorrowers must be able to demonstrate a steady employment history or have been working for the same employer for the past two years.","metadata":{"source":"limits2023.md"}}],["1",{"pageContent":"### 1) Steady Employment History\nBorrowers must be able to demonstrate a steady employment history or have been working for the same employer for the past two years.\n\n### 2) Social Security Number\nBorrowers must have a valid social security number, lawfully reside in the U.S. and be of legal age to sign a mortgage in their respective state at the time of application.\n\n### 3) Down-Payment\nBorrowers must put a minimum down payment of 3.5%, which can be gifted by a family member.\n\n### 4) Owner-Occupied Residence\nNew FHA loans are only available for primary residence occupancy. You must live in the home as your primary residence after purchase. FHA loans are designed to encourage home-ownership. The owner-occupancy requirement prevents investors from buying the homes and renting them out.","metadata":{"source":"limits2023.md"}}],["2",{"pageContent":"### 5) Property Appraisal\nBorrowers are required to have a property appraisal from a FHA-approved appraiser. The property must meet certain minimum standards at appraisal. If the home you want to purchase does not meet these standards and a seller will not agree to the required repairs, your only option is to pay for the required repairs at closing (to be held in escrow until the repairs are complete).\n\n### 6) Front-End Ratio\nBorrowers are generally required to have a front-end ratio (mortgage payment plus HOA fees, property taxes, mortgage insurance, homeowners insurance) of less than 31% of their gross income. Sometimes, you may be approved with as high a percentage as 40% but your lender will be required to provide justification as to why they believe the mortgage presents an acceptable risk. The lender must then include any compensating factors used for loan approval.","metadata":{"source":"limits2023.md"}}],["3",{"pageContent":"### 7) Back-End Ratio\nBorrowers are required to have a back-end ratio (mortgage plus all your monthly debt, i.e., credit card payment, car payment, student loans, etc.) of less than 43% of their gross income. Sometimes, you may be approved with as high a percentage as 50% but your lender will be required to provide justification as to why they believe the mortgage presents an acceptable risk. The lender must include any compensating factors used for loan approval.\n\n### 8) Minimum Credit Score\nBorrowers are required to have a minimum credit score of 580 for maximum financing with a minimum down payment of 3.5%. Borrowers are required to have a minimum credit score of 500-579 for maximum loan-to-value (LTV) of 90% with a minimum down payment of 10%. FHA-qualified lenders determine on a case-by-case basis an applicants’ credit worthiness.","metadata":{"source":"limits2023.md"}}],["4",{"pageContent":"### 9) Bankruptcy\nBorrowers must be two years out of bankruptcy and have re-established good credit. Some exceptions can be made if there were extenuating circumstances beyond your control that caused the bankruptcy and you have managed your money in a responsible manner.\n\n### 10) Foreclosure\nBorrowers must be three years out of foreclosure and have re-established good credit. Some exceptions can be made if there were extenuating circumstances and you’ve improved your credit. Not being able to sell your home because you had to move to a new area does not qualify as an exception to the three-year foreclosure guideline.","metadata":{"source":"limits2023.md"}}],["5",{"pageContent":"What should I know about applying for an [FHA mortgage](https://www.fha.com/fha_loan_types)? FHA home loans differ from their conventional counterparts in many ways including a lower [down payment requirement](https://www.fha.com/fha_loan_requirements), generally more forgiving credit requirements, and occupancy rules. For maximum financing, FHA loan rules say [FICO scores of 580 or better](https://www.fha.com/fha_credit_requirements) are required. However, lender standards may be higher-check with your chosen financial institution to see what [FICO score minimums](https://www.fha.com/fha_credit) apply there.\n\n**FHA Payment Requirements: The “12 Month Rule”**\n\nFor best results, you should plan to begin the FHA loan application process with no less than 12 consecutive calendar months of on-time payments for all financial obligations including rent/mortgage payments. Those 12 months should be up to and including the month you apply for the loan.\n\n**FHA Mortgage Insurance Premiums**","metadata":{"source":"limits2023.md"}}],["6",{"pageContent":"**FHA Mortgage Insurance Premiums**\n\nMost FHA mortgage loans today (with certain exceptions listed in the FHA loan handbook for transactions on tribal lands or Hawaiian homelands) require an Up Front Mortgage Insurance Premium (UFMIP) and an annual mortgage insurance premium which is paid in installments over 12 months. The monthly payment is considered part of your monthly mortgage obligation.\n\n**Mortgage Loan Amount Rules: No Cash Back on Forward Mortgages**\n\nFHA “forward mortgages” or purchase loans can be made only for the amount of the mortgage plus approved add-ons to the loan amount; UFMIP, certain closing costs, etc.\n\nForward loans will not result in cash back at closing time unless you are due a refund for something paid up front but later financed into the loan. FHA forward mortgages cannot be used as a personal loan-some want to apply for more than the transaction requires and take the excess in cash. This will not happen with FHA mortgages.\n\n**Minimum Down Payments**","metadata":{"source":"limits2023.md"}}],["7",{"pageContent":"**Minimum Down Payments**\n\nThe FHA loan minimum down payment requirement for forward mortgages is 3.5% of the adjusted value of the home. Some make higher down payments due to credit issues as a “compensating factor”. Some want to know if there is a no-money-down option with FHA mortgages, but the only kind of zero down payment FHA new purchase loan available is intended to assist victims of a natural disaster in a federally declared disaster area.\n\n**FHA Loan Requirements for Occupancy, Residency**","metadata":{"source":"limits2023.md"}}],["8",{"pageContent":"**FHA Loan Requirements for Occupancy, Residency**\n\nFHA home loans-new purchase mortgages, One-time Close construction loans, 203(k) rehab loans, and others-require the borrower to be an owner/occupier of the property secured by the FHA mortgage. When it comes to U.S. residency issues, the borrower(s) do not have to be United States citizens. FHA loan rules state that the applicant must be in the U.S. legally and have documentation to prove it. That means resident aliens and nonresident alien loan applicants are permitted. Documentation of legal status is required.\n\n**Can I get a FHA Loan if I have credit problems?**\nThe FHA recommends a Consumer Credit Counseling program for anyone who fears being denied a loan as a credit risk. As a rule, you should be in a satisfactory payment situation for at least one year before applying for any FHA loan program.","metadata":{"source":"limits2023.md"}}],["9",{"pageContent":"Your credit counselor can address issues such as debt-to-income ratio, how to maintain satisfactory payments for the required time and challenging unfair or erroneous entries on your credit report. It is very important to approach any FHA loan with an improved credit rating if you have had trouble in the past.\n\nA lender will review your credit report looking for patterns of more reliable credit habits since the time your credit problems took place and, hopefully, were satisfied. If your credit history shows evidence of responsible credit, on-time payments, etc. during the past 12 months, the issues may be viewed as isolated issues that have since been dealt with.\n\nIf your credit history does not show marked improvement, it's likely that the lender won't approve your loan. They are looking for dependable borrowers and may advise you to improve your credit history before applying again.\n\n\n### **FHA Cash-out Refinance Guidelines**","metadata":{"source":"limits2023.md"}}],["10",{"pageContent":"- **Credit Scores**\n \n According to FHA guidelines, applicants must have a minimum credit score of 580 to qualify for an FHA cash-out refinance. Most FHA insured lenders, however, set their own limits higher to include a minimum score of 600 - 620, since cash-out refinancing is more carefully approved than even a home purchase. Some companies require at least one credit score for all qualifying borrowers. Others require that you use the middle score if there are three applicable scores, or use the lower in case of two. The lowest credit score would be used for qualification purposes. Consult your licensed loan officer regarding the lending institution's credit requirements in such cases.","metadata":{"source":"limits2023.md"}}],["11",{"pageContent":"- **Debt-to-Income Ratio**The FHA has guidelines regarding an applicant's debt-to-income ratio in order to keep people from entering into mortgage agreements that they cannot afford. Therefore, many borrowers choose to pay off certain debts to keep the ratio low. There are two different calculations to take into account:\n \n *Mortgage Payment Expense to Effective Income*This is calculated by dividing your total housing payment by your income. Add up the total mortgage payment (principal and interest, escrow payments for taxes, hazard insurance, mortgage insurance premium, homeowners' association dues, etc.). Take that amount and divide it by gross monthly income. The maximum ratio to qualify is 31 percent.","metadata":{"source":"limits2023.md"}}],["12",{"pageContent":"*Total Fixed Payment to Effective Income*Add up the total mortgage payment (principal and interest, escrow payments for taxes, hazard insurance, mortgage insurance premium, homeowners' association dues, etc.) and all recurring monthly expenses and installment debt (car loans, personal loans, student loans, credit cards, etc.). Take that amount and divide it by gross monthly income. This gives you the total debt ratio that includes monthly credit obligations, which needs to be lower than 43 percent to qualify.\n \n- **Maximum Loan to Value**\n \n FHA cash-out refinance loans have a maximum loan-to-value of 80 percent of the home's current value. The LTV ratio is calculated by dividing the loan amount requested by the property value determined in the appraisal.\n \n- **Payment History Requirements**","metadata":{"source":"limits2023.md"}}],["13",{"pageContent":"- **Payment History Requirements**\n \n Documentation is required to prove that the borrower has made all the monthly payments for the previous 12 months, or since the borrower obtained the loan, whichever is less. Mortgaged properties must have a minimum of 6 months of payments made before you are able to apply for a refinance. If you own your home free and clear, it may be refinanced as a cash-out transaction.","metadata":{"source":"limits2023.md"}}],["14",{"pageContent":"#### FHA Requirements\n\n## Closing Costs and Allowable Charges\n\nWhile FHA requirements define which closing costs are allowable as charges to the borrower, the specific costs and amounts that are deemed reasonable and customary are determined by each local FHA office. All other costs are generally not allowed and are usually paid by the seller when buying a new home, or paid by the lender when refinancing your existing FHA loan.\n\n- Lender's origination fee\n- Deposit verification fees\n- Attorney's fees\n- The appraisal fee and any inspection fees\n- Lender's origination fee\n- Cost of title insurance and title examination\n- Document preparation (by a third party)\n- Property survey\n- Credit reports (actual costs)\n- Transfer stamps, recording fees, and taxes\n- Test and certification fees\n- Home inspection fees up to $200\n\nAllowed in an FHA refinance loan are wire transfer fees, courier fees, reconveyance fees, and fees to payoff bills.\n\n\n# Fixed Rate FHA Loans","metadata":{"source":"limits2023.md"}}],["15",{"pageContent":"Allowed in an FHA refinance loan are wire transfer fees, courier fees, reconveyance fees, and fees to payoff bills.\n\n\n# Fixed Rate FHA Loans\n\n## The Popular 203(b) Federally Guaranteed Mortgage\n\nHome ownership rates in America continue to increase at a steady rate due in a large part to the implementation of FHA home loans insurance program. Over the years, FHA has helped Americans gain the financial independence that comes with owning a home. By creating jobs and reasonable mortgage rates for the middle class, financing military housing, and producing housing for the low income and the elderly, FHA has helped Americans become some of the best housed people in the world with a homeownership rate of 64.2% for Americans currently owning their own homes. FHA has insured more than 46 million home loans since 1934.\n\n### **HOW IT WORKS**","metadata":{"source":"limits2023.md"}}],["16",{"pageContent":"### **HOW IT WORKS**\n\nBy serving as an umbrella under which lenders have the confidence to extend loans to those who may not meet conventional loan requirements, FHA's mortgage insurance allows individuals to qualify who may have been previously denied for a home loan by conventional underwriting guidelines.\n\nFHA loans benefit those who would like to purchase a home but haven't been able to put money away for the purchase, like recent college graduates, newlyweds, or people who are still trying to complete their education. It also allows individuals to qualify for a FHA loan whose credit has been marred by bankruptcy or foreclosure.\n\n### **NUTS AND BOLTS**","metadata":{"source":"limits2023.md"}}],["17",{"pageContent":"### **NUTS AND BOLTS**\n\nThe most popular FHA home loan is the 203(b). This fixed-rate loan often works well for first-time homebuyers because it allows individuals to finance up to 96.5 percent of their home loan which helps to keep down payments and closing costs at a minimum. The 203(b) home loan is also the only loan in which 100 percent of the closing costs can be a gift from a relative, non-profit, or government agency.\n\nFHA will collect the annual MIP, which is the time on which you will pay for FHA Mortgage Insurance Premiums on your FHA loan. Cancellation of the premiums are as follows:\n\n- No more than 15 year termLoan to value at closing up to 90% 11 year termination\n- No more than 15 year termLoan to value at closing greater than 90% No cancellation until loan paid off\n- Greater than 15 year termLoan to value at closing up to 90%11 year termination\n- Greater than 15 year termLoan to value at closing greater than 90% No cancellation until loan paid off\n\n### **GUIDELINES**","metadata":{"source":"limits2023.md"}}],["18",{"pageContent":"### **GUIDELINES**\n\nIt is not necessary to meet a minimum income requirement in order to qualify for a FHA loan but debt ratios specific to the state in which the home will be purchased have been put into place to prevent borrowers from getting into a home they cannot afford. This is done through a close analysis of income and monthly expenses.\n\n\n\n2023 Nationwide Forward Mortgage Loan Limits\n\nPurpose\nThis Mortgagee Letter (ML) establishes the 2023 Nationwide Forward\nMortgage Loan Limits.\n\nEffective Date The provisions of this ML are effective for case numbers assigned on or\nafter January 1, 2023.\n\nAll updates will be incorporated into a forthcoming update of the HUD\nHandbook 4000.1, FHA Single Family Housing Policy Handbook\n(Handbook 4000.1).","metadata":{"source":"limits2023.md"}}],["19",{"pageContent":"All updates will be incorporated into a forthcoming update of the HUD\nHandbook 4000.1, FHA Single Family Housing Policy Handbook\n(Handbook 4000.1).\n\nPublic Feedback HUD welcomes feedback from interested parties for a period of 30 calendar\ndays from the date of issuance. To provide feedback on this policy\ndocument, please send feedback to the FHA Resource Center at\nanswers@hud.gov. HUD will consider the feedback in determining the\nneed for future updates.\n\nAffected\nPrograms\n\nThe provisions of this ML apply to Title II forward mortgage programs.","metadata":{"source":"limits2023.md"}}],["20",{"pageContent":"Affected\nPrograms\n\nThe provisions of this ML apply to Title II forward mortgage programs.\n\n\n\nBackgroundThe Federal Housing Administration (FHA) calculates forward mortgagelimits based on the median house prices in accordance with the NationalHousing Act. FHA’s Single Family forward mortgage limits are set byMetropolitan Statistical Area (MSA) and county and are publishedperiodically. For purposes of conforming high-cost-area limits to theindexing of the base Freddie Mac loan limit required in 305(a)(2) of theFederal Home Loan Mortgage Corporation Act, HUD uses indexing ofcounty-level prices starting in 2008, the year that current statutoryauthorities for FHA loan limit determination were enacted. The limits inthese areas are set using the county with the highest median price within themetropolitan statistical area. FHA publishes updated limits effective foreach calendar year.","metadata":{"source":"limits2023.md"}}],["21",{"pageContent":"As HUD Handbook 4000.1, Section II.A.2.a.ii states, FHA forward\nmortgage limits for individual MSAs and counties are available on the\ninternet at https://entp.hud.gov/idapp/html/hicostlook.cfm. Also,\ndownloadable text files with complete listings of all county loan limits are\navailable at http://www.hud.gov/pub/chums/file_layouts.html. FHA has\npublished a list of areas at the ceiling, and between the floor and ceiling on\nthe Maximum Mortgage Limits web page at\nhttps://www.hud.gov/program_offices/housing/sfh/lender/origination/mortg\nage_limits.\n\n\nFHA permits appeals to change high-cost-area loan limits in accordance\nwith HUD Handbook 4000.1, Section II.A.2.a.ii(A).\n\n\n\nSummary ofChanges\n\nThis ML:\n\n- Updates section II.A.2.a.ii(B) – Low-cost Area;\n- Updates section II.A.2.a.ii(C) – High-cost Area; and\n- Updates section II.A.2.a.ii(D) – Special Exceptions for Alaska,Hawaii, Guam, and the Virgin Islands.\n\n FHA SingleFamily HousingPolicyHandbook\n\n1.","metadata":{"source":"limits2023.md"}}],["22",{"pageContent":"FHA SingleFamily HousingPolicyHandbook\n\n1. \n\nThe policy changes will be incorporated into Handbook 4000.1 as follows:\n\nNationwide Mortgage Limits (II.A.2.a.ii(B), (C), and (D))\n\n\nII.A.2.a.ii(B) – Low-cost Area\n\n\nThe FHA national low-cost area mortgage limits, which are set at 65 percent\nof the national conforming limit of $726,200 for a one-unit Property, are, by\nproperty unit number, as follows:\n\n- One-unit: $472,030\n- Two-unit: $604,400\n- Three-unit: $730,525\n- Four-unit: $907,900\n\n\n\n\n\nJulia R. Gordon\nAssistant Secretary for Housing -\nFHA Commissioner\n\n\n### Table below shows the 2023 FHA Loan Limit for each state of in America for Single Family Unit and the limit for a Four-Plex. ###","metadata":{"source":"limits2023.md"}}],["23",{"pageContent":"| State | Single Family Unit Limit | Four-Plex Limit |\n|----------------------|-------------------|--------------------|\n| Alabama | $472,030 | $907,900 |\n| Alaska | $472,030 | $1,127,900 |\n| American Samoa | $472,030 | $907,900 |\n| Arizona | $472,030 | $1,019,550 |\n| Arkansas | $472,030 | $907,900 |\n| California | $472,030 | $2,095,200 |\n| Colorado | $472,030 | $2,095,200 |\n| Connecticut | $472,030 | $1,360,100 |\n| Delaware | $472,030 | $1,017,300 |\n| District Of Columbia | $1,089,300 | $2,095,200 |\n| Florida | $472,030 | $1,680,800 |\n| Georgia | $472,030 | $1,138,950 |\n| Guam | $563,500 | $1,083,650 |","metadata":{"source":"limits2023.md"}}],["24",{"pageContent":"| Florida | $472,030 | $1,680,800 |\n| Georgia | $472,030 | $1,138,950 |\n| Guam | $563,500 | $1,083,650 |\n| Hawaii | $517,500 | $1,879,850 |\n| Idaho | $472,030 | $2,095,200 |\n| Illinois | $472,030 | $907,900 |\n| Indiana | $472,030 | $907,900 |\n| Iowa | $472,030 | $907,900 |\n| Kansas | $472,030 | $907,900 |\n| Kentucky | $472,030 | $907,900 |\n| Louisiana | $472,030 | $907,900 |\n| Maine | $472,030 | $973,100 |\n| Mariana Islands | $472,030 | $1,023,950 |\n| Maryland | $472,030 | $2,095,200 |\n| Massachusetts | $472,030 | $2,095,200 |","metadata":{"source":"limits2023.md"}}],["25",{"pageContent":"| Mariana Islands | $472,030 | $1,023,950 |\n| Maryland | $472,030 | $2,095,200 |\n| Massachusetts | $472,030 | $2,095,200 |\n| Michigan | $472,030 | $907,900 |\n| Minnesota | $472,030 | $990,800 |\n| Mississippi | $472,030 | $907,900 |\n| Missouri | $472,030 | $907,900 |\n| Montana | $472,030 | $1,353,500 |\n| Nebraska | $472,030 | $1,161,050 |\n| Nevada | $472,030 | $1,265,000 |\n| New Hampshire | $472,030 | $1,592,350 |\n| New Jersey | $472,030 | $2,095,200 |\n| New Mexico | $472,030 | $1,121,250 |\n| New York | $472,030 | $2,095,200 |\n| North Carolina | $472,030 | $1,548,100 |","metadata":{"source":"limits2023.md"}}],["26",{"pageContent":"| New Mexico | $472,030 | $1,121,250 |\n| New York | $472,030 | $2,095,200 |\n| North Carolina | $472,030 | $1,548,100 |\n| North Dakota | $472,030 | $907,900 |\n| Ohio | $472,030 | $939,900 |\n| Oklahoma | $472,030 | $907,900 |\n| Oregon | $472,030 | $1,326,950 |\n| Pennsylvania | $472,030 | $2,095,200 |\n| Puerto Rico | $472,030 | $1,023,950 |\n| Rhode Island | $661,250 | $1,271,650 |\n| South Carolina | $472,030 | $1,035,000 |\n| South Dakota | $472,030 | $907,900 |\n| Tennessee | $472,030 | $1,711,750 |\n| Texas | $472,030 | $1,099,150 |\n| Utah | $472,030 | $2,095,200 |","metadata":{"source":"limits2023.md"}}],["27",{"pageContent":"| Tennessee | $472,030 | $1,711,750 |\n| Texas | $472,030 | $1,099,150 |\n| Utah | $472,030 | $2,095,200 |\n| Vermont | $472,030 | $946,550 |\n| Virgin Islands | $472,030 | $1,851,100 |\n| Virginia | $472,030 | $2,095,200 |\n| Washington | $472,030 | $1,879,850 |\n| West Virginia | $472,030 | $2,095,200 |\n| Wisconsin | $472,030 | $990,800 |\n| Wyoming | $472,030 | $2,095,200 |","metadata":{"source":"limits2023.md"}}],["28",{"pageContent":"FHA and conventional Loan limits vary based on the number of living-units on the property. FHA loans are only allowed on 1 to 4 living-unit properties. These 1 to 4 unit properties can be purchased with an FHA loan as long as the owner occupies one of the unit. Properties with over 4 units are considered commercial and do not quality for FHA or conventional loans.\n\n### Madison County Limits\nLimits for FHA Loans in Madison County, Alabama range from $472,030 for 1 living-unit homes to $907,900 for 4 living-units. Conventional Loan Limits in Madison County are $726,200 for 1 living-unit homes to $1,396,800 for 4 living-units. The 2023 Home Equity Conversion Mortgage (HECM) limits in Madison County is $1,089,300. HECM limit does not depend on the size of the home.","metadata":{"source":"limits2023.md"}}],["29",{"pageContent":"### Conventional Loans\nConventional loans (also called \"conforming\") are loans that conform to the requirements set by Fannie Mae and Freddie Mac. Fannie Mae and Freddie Mac buy home loans from lenders to provide liquidity. This allows lenders to continue lending to home buyers. Otherwise, banks might not have enough money on hand continue lending. Fannie and Freddie set strict standards for the types of loans they will buy.\n\nTo see if a home qualifies for an FHA loan, the property must be appraised by an approved FHA appraiser.\n\nVA Loans are similar to FHA Loans in that it allows you to buy a home with very little money down. However VA Loans are only available to veterans of the Armed Forces. With VA loans the Department of Veterans Affairs guarantees the loan on the veteran's behalf. The maximum the VA will guarantee is set to the same amount as the single-family Fannie/Freddie Loan Limit. So the Madison County, AL 2023 VA Loan Limit is $726,200","metadata":{"source":"limits2023.md"}}],["30",{"pageContent":"The minimum loan amount in Madison County is $5,000 dollars and may go up to $907,900 depending on home size and loan type. In order to qualify for an FHA loan, you must be planning to live in the home. Although a loan can include some renovation costs, FHA loans cannot be used for real estate investments in Madison County.\n\n### Table below shows the 2023 FHA Loan Limit for the Counties in Alabama for Single Family Unit and the limit for a Four-Plex. ###","metadata":{"source":"limits2023.md"}}],["31",{"pageContent":"| County | Single Family Unit Limit | Four-Plex Limit |\n|-------------------|----------------------------|---------------------------|\n| Autauga County | $472,030 | $907,900 |\n| Baldwin County | $472,030 | $907,900 |\n| Barbour County | $472,030 | $907,900 |\n| Bibb County | $472,030 | $907,900 |\n| Blount County | $472,030 | $907,900 |\n| Bullock County | $472,030 | $907,900 |\n| Butler County | $472,030 | $907,900 |\n| Calhoun County | $472,030 | $907,900 |\n| Chambers County | $472,030 | $907,900 |\n| Cherokee County | $472,030 | $907,900 |","metadata":{"source":"limits2023.md"}}],["32",{"pageContent":"| Chambers County | $472,030 | $907,900 |\n| Cherokee County | $472,030 | $907,900 |\n| Chilton County | $472,030 | $907,900 |\n| Choctaw County | $472,030 | $907,900 |\n| Clarke County | $472,030 | $907,900 |\n| Clay County | $472,030 | $907,900 |\n| Cleburne County | $472,030 | $907,900 |\n| Coffee County | $472,030 | $907,900 |\n| Colbert County | $472,030 | $907,900 |\n| Conecuh County | $472,030 | $907,900 |\n| Coosa County | $472,030 | $907,900 |\n| Covington County | $472,030 | $907,900 |","metadata":{"source":"limits2023.md"}}],["33",{"pageContent":"| Coosa County | $472,030 | $907,900 |\n| Covington County | $472,030 | $907,900 |\n| Crenshaw County | $472,030 | $907,900 |\n| Cullman County | $472,030 | $907,900 |\n| Dale County | $472,030 | $907,900 |\n| Dallas County | $472,030 | $907,900 |\n| Dekalb County | $472,030 | $907,900 |\n| Elmore County | $472,030 | $907,900 |\n| Escambia County | $472,030 | $907,900 |\n| Etowah County | $472,030 | $907,900 |\n| Fayette County | $472,030 | $907,900 |\n| Franklin County | $472,030 | $907,900 |","metadata":{"source":"limits2023.md"}}],["34",{"pageContent":"| Fayette County | $472,030 | $907,900 |\n| Franklin County | $472,030 | $907,900 |\n| Geneva County | $472,030 | $907,900 |\n| Greene County | $472,030 | $907,900 |\n| Hale County | $472,030 | $907,900 |\n| Henry County | $472,030 | $907,900 |\n| Houston County | $472,030 | $907,900 |\n| Jackson County | $472,030 | $907,900 |\n| Jefferson County | $472,030 | $907,900 |\n| Lamar County | $472,030 | $907,900 |\n| Lauderdale County | $472,030 | $907,900 |\n| Lawrence County | $472,030 | $907,900 |","metadata":{"source":"limits2023.md"}}],["35",{"pageContent":"| Lauderdale County | $472,030 | $907,900 |\n| Lawrence County | $472,030 | $907,900 |\n| Lee County | $472,030 | $907,900 |\n| Limestone County | $472,030 | $907,900 |\n| Lowndes County | $472,030 | $907,900 |\n| Macon County | $472,030 | $907,900 |\n| Madison County | $472,030 | $907,900 |\n| Marengo County | $472,030 | $907,900 |\n| Marion County | $472,030 | $907,900 |\n| Marshall County | $472,030 | $907,900 |\n| Mobile County | $472,030 | $907,900 |\n| Monroe County | $472,030 | $907,900 |","metadata":{"source":"limits2023.md"}}],["36",{"pageContent":"| Mobile County | $472,030 | $907,900 |\n| Monroe County | $472,030 | $907,900 |\n| Montgomery County | $472,030 | $907,900 |\n| Morgan County | $472,030 | $907,900 |\n| Perry County | $472,030 | $907,900 |\n| Pickens County | $472,030 | $907,900 |\n| Pike County | $472,030 | $907,900 |\n| Randolph County | $472,030 | $907,900 |\n| Russell County | $472,030 | $907,900 |\n| Shelby County | $472,030 | $907,900 |\n| St. Clair County | $472,030 | $907,900 |\n| Sumter County | $472,030 | $907,900 |","metadata":{"source":"limits2023.md"}}],["37",{"pageContent":"| St. Clair County | $472,030 | $907,900 |\n| Sumter County | $472,030 | $907,900 |\n| Talladega County | $472,030 | $907,900 |\n| Tallapoosa County | $472,030 | $907,900 |\n| Tuscaloosa County | $472,030 | $907,900 |\n| Walker County | $472,030 | $907,900 |\n| Washington County | $472,030 | $907,900 |\n| Wilcox County | $472,030 | $907,900 |\n| Winston County | $472,030 | $907,900 |","metadata":{"source":"limits2023.md"}}],["38",{"pageContent":"### What is a Conventional Loan?\nConventional loans meet the Fannie Mae and Freddie Mac guidelines (both of which are quasi-public government agencies) and are offered by private lending institutions without being insured by the federal government.\n\nConventional loan requirements are not as flexible as government loan requirements. This type of loan is frequent among real estate investors because government-backed FHA loans can only be used for homeowners looking to purchase an owner-occupied home.\n\nNote: A conventional loan is often referred to as a conforming loan because it qualifies as such. However, not all conforming loans are conventional loans. Like how all squares are rectangles, but not all rectangles are squares.","metadata":{"source":"limits2023.md"}}],["39",{"pageContent":"### What is an FHA Loan?\nFHA loans are the most popular home loans utilized by first-time property buyers. The FHA loan eligibility criteria is more flexible than other loan packages. FHA loans have a low credit score requirement for all types of mortgages and down payments for FHA loans can be gifts from friends or family.\n\nFHA loans have lower interest rates than conventional loans because FHA loans are safer for lenders. However, you have to pay premiums on the FHA mortgage insurance in addition to your mortgage payment.\n\nIn many cases, especially with a small down-payment or a low credit score, the lower interest rates outweigh the higher cost of mortgage insurance.\n\n### What is a Conforming Loan?\nA conforming loan is a loan that meets the guidelines issued by Fannie Mae and Freddie Mac. As explained in the Federal Housing Finance Agency’s website, both agencies help in providing “liquidity, stability, and affordability to the mortgage market.”","metadata":{"source":"limits2023.md"}}],["40",{"pageContent":"In order to securitize virtually any mortgage, conforming guidelines were created to help Fannie Mae and Freddie Mac assess which mortgages could be safely purchased. These guidelines factor in the credit score and history of the borrower, the debt to income ratio (DTI), the mortgage’s loan to value ratio, and the size of the loan.\n\n### What is a Jumbo Loan?\nA jumbo loan is a non-conforming loan that exceeds the conventional loan limit. Due to the higher loan amount, jumbo loan requirements will be more difficult to satisfy compared with a conventional loan.\n\nJumbo loans are used to buy large or luxury homes and are not typically used by first-time homebuyers.\n\n\nThis table will help you visualize the implications of both FHA loans and conventional loans.","metadata":{"source":"limits2023.md"}}],["41",{"pageContent":"| FHA Loan Requirements | Conventional Loan Requirements |\n|-------------------------|--------------------------------------------------------------------------------------------------------------|\n| Credit Score | Accepts credit scores as low as 580 | Requires a higher credit score of 620 |\n| Down Payment | Down payment as low as 3.5% | Requires minimum 5% |","metadata":{"source":"limits2023.md"}}],["42",{"pageContent":"| Interest Rates | Lower | Higher |\n| Refinancing | No requirement for reappraisal, credit check, or income verification | Requires a credit check |\n| Loan Limits | Median limit is $530,150 for a 4-bedroom home. View Loan Limits » | Median loan limit is $815,650 for a 4-bedroom home. |","metadata":{"source":"limits2023.md"}}],["43",{"pageContent":"| Owner-Occupied | FHA loans are required to be owner-occupied | Conventional loans are not required to be owner-occupied |\n| Down Payment Assistance | Down payment assistance programs are available (TDHCA, TSAHC, and SETH) | There are no down payment assistance programs available |\n| Mortgage Insurance | There is an upfront mortgage insurance payment required on top of a monthly payment for the life of the loan | No mortgage insurance required so long as the down payment is at least 20% or upon the loan being paid down to 78% of the loan to value. |","metadata":{"source":"limits2023.md"}}],["44",{"pageContent":"| Assumable | Assumable | Not Assumable |\n| Down Payment as Gift | 100% down payment as a gift is allowed | Only a percentage of the down payment as a gift is allowed |","metadata":{"source":"limits2023.md"}}],["45",{"pageContent":"### When a Conventional Loan is Better Than an FHA Loan\nIf you intend to use a 20% down payment to avoid private mortgage insurance, you will only be able to request for conventional financing due to FHA loans requiring mortgage insurance regardless of the sum of the down payment.\n\nIn this situation, a conventional loan will be cheaper than an FHA loan due to the 20% down payment avoiding private mortgage insurance.\n\n### When an FHA Loan is Better Than a Conventional Loan\nFHA loans are one of the easiest types of loans to qualify for. If you do not have a great credit score or a large down payment, an FHA loan may be a better fit for you.\n\nTo satisfy FHA loan requirements, it will be easier for those with credit scores of at least 580. With a credit score of 580, you will only need a down payment of 3.5% which is significantly lower than what is required for conventional home loans.","metadata":{"source":"limits2023.md"}}],["46",{"pageContent":"If your goal is home ownership but you don’t have the 20% down payment required by many conventional loan products, an FHA loan may be a good option for your home purchase.\n\nCreated in 1934, the Federal Housing Administration (FHA) loan is designed to ensure that people can buy homes that are in good condition with affordable financing terms, thus increasing the ability of the average American to afford a home.\n\n### What Are the Advantages of an FHA Loan?\n\nOne of the biggest advantages of the FHA loan is the smaller down payment requirement. Instead of 20%, you may be able to qualify for a down payment of 3.5%. For example, if you want to buy a home for $250,000, a conventional loan down payment could be $50,000. Add closing costs to that and you could find yourself paying a hefty amount up front for your home. However, an FHA loan at 3.5% means your down payment would only be $8,750. That’s quite a difference!","metadata":{"source":"limits2023.md"}}],["47",{"pageContent":"FHA loans often have less stringent credit requirements, so if you have some negative items in your credit history—like a foreclosure or repossession—you may still qualify for an FHA mortgage.\n\n### What’s the Difference Between Pre-Qualifying and Pre-Approval?\n\nPre-approval is an important part of the process of applying for an FHA loan, and helps you ensure that your home purchase process proceeds smoothly all the way to closing. If you are looking for FHA loan application information, you may see a lot about\n\n*pre-qualifying*\n\n. Pre-qualification is quick and easy to do although it gives almost no real insight into your chances of obtaining an FHA loan.","metadata":{"source":"limits2023.md"}}],["48",{"pageContent":"*pre-qualifying*\n\n. Pre-qualification is quick and easy to do although it gives almost no real insight into your chances of obtaining an FHA loan.\n\nA **pre-approval process**, on the other hand, will look at your real financial information to learn how likely you are to be approved for an FHA loan. An FHA-approved lender will evaluate your financial situation, including documents related to employment, credit, debt, and assets. From this information, the lender will decide whether you are likely to be approved as well as how much you would be approved for.","metadata":{"source":"limits2023.md"}}],["49",{"pageContent":"That means that you can look for a home with a firm idea of both [your price range](https://fhaloans.guide/loan-limits) and your ability to get financing. Then, when you find a home you love, you can make an offer that includes your pre-approval letter from the lender. Homeowners are much more receptive to offers that include pre-approvals, since they can be confident that the contract will not fall through based on a failure to secure financing.\n\n### What Kind of Documentation is Required?\n\nThe lender will need to look at a number of documents to verify your identity and your financial and employment information. You will need to provide:","metadata":{"source":"limits2023.md"}}],["50",{"pageContent":"### What Kind of Documentation is Required?\n\nThe lender will need to look at a number of documents to verify your identity and your financial and employment information. You will need to provide:\n\n- Your social security card\n- W-2 statements and tax returns for the previous two years\n- Two months of pay stubs (including year-to-date earnings)\n- Employment verification letter\n- Divorce decree (if applicable) along with financial information regarding alimony and other financial settlements\n- Documents related to other assets, including retirement accounts\n\nThe lender will run a credit report in order to calculate your income-to-debt ratio. The minimum credit score for an FHA loan with 3.5% down is 580.\n\n**With 10% down, the minimum credit score is 500**\n\n. However, minimum credit score is also subject to the discretion of the lender, and some will not write an FHA loan for borrowers with a score lower than 620.\n\n### How Much Money Will I Need To Have On Hand To Be Pre-Approved?","metadata":{"source":"limits2023.md"}}],["51",{"pageContent":"### How Much Money Will I Need To Have On Hand To Be Pre-Approved?\n\nYou will need to prove that you have the necessary funds to cover the down payment. This can come from savings, a loan, or a gift. However, the gift can not be from anyone who would financially benefit from the transaction, like the seller, real estate agent, or lender. If your down payment comes from a gift, it will need to be accompanied by a letter from the giver stating that it is a gift and not a loan.\n\nYou will also need to account for closing costs subject to FHA guidelines. You may be able to receive some of your closing costs as a seller concession when negotiating the purchase of the home. However, there is a [cap on the amount](https://fhaloans.guide/loan-limits) depending on the specific type of FHA loan, so consult your lender for exact figures.\n\n### Hometown Lenders INC\nBilly Taylor is the Owner and CEO of Hometown Lenders\n\nHometown Lenders Corporate office are located in Huntsville Alabama","metadata":{"source":"limits2023.md"}}],["52",{"pageContent":"### Hometown Lenders INC\nBilly Taylor is the Owner and CEO of Hometown Lenders\n\nHometown Lenders Corporate office are located in Huntsville Alabama\n\nAt Hometown Lenders, Inc., we put People before Profits. Our hometown way of doing business has always been to make sure that each customer receives the highest level of personalized customer service throughout the entire mortgage loan process.\n\nOur clients praise us for the communications that we maintain with them throughout the entire mortgage loan process. We make sure that you always have two points of contact so that you can feel comfortable knowing that someone is just seconds away when you need them. Guaranteed! At HomeTown Lenders, “People before Profits” isn’t just a catch phrase…it’s the way we do business…every day!","metadata":{"source":"limits2023.md"}}],["53",{"pageContent":"### Matthew Hillis Information\nMatthew Hillis is the programmer who is playing with this program about FHA Loans. He is testing methods of loading data that is local to the company. Below are some quotes Matthew imagines he has heard people say.\n\n### Quotes about Matthew\nMatthew Hillis is the greatest person that Billy Taylor has ever known. \nZachary Beaman was quoted \"I wish I was as great as Matthew Hillis!\" \nJohn Taylor was quoted \"Hillis is a Man amoung Men!\"\nJen Conley said \"Matthew was the best IT guy and person to ever be!\"\n\n\n### Hometown Lenders Corporate Office Address\n\nNMLS ID:\t65084\nStreet Address:\t350 The Bridge Street\nSuites 116, 200 & 202\nHuntsville, AL 35806\nPhone: 256-828-8883\nToll Free number: 1-888-628-1414\n\n\n\n### Hometown Lenders Branch Locations","metadata":{"source":"limits2023.md"}}],["54",{"pageContent":"| Street Address | City | State | Zip Code | Other Trade Names | NMLS ID |\n|------------------------------------------------------------------|------------------|-------|----------|-----------------------------|---------|\n| 1943-A S College Street | Auburn | AL | 36830 | None | 2281313 |\n| 109 First Avenue SW | Cullman | AL | 35055 | None | 1775994 |\n| 714 Murray Road | Dothan | AL | 36303 | None | 224573 |\n| 12765 Highway 231/431, Suite B | Hazel Green | AL | 35750 | None | 2235945 |","metadata":{"source":"limits2023.md"}}],["55",{"pageContent":"| 12765 Highway 231/431, Suite B | Hazel Green | AL | 35750 | None | 2235945 |\n| 501 Riverchase Parkway East, Suite 200 | Hoover | AL | 35244 | None | 911847 |\n| 900 Merchants Walk Suites A,B and C | Huntsville | AL | 35801 | 1st Family Mortgage Company | 1456157 |\n| 1810 3rd Avenue, Suite 104 | Jasper | AL | 35501 | Southtown Mortgage | 1732447 |\n| 22078 Highway 216, Suite C | McCalla | AL | 35111 | None | 1869572 |\n| 308 S. Sage Ave. | Mobile | AL | 36606 | None | 1183960 |","metadata":{"source":"limits2023.md"}}],["56",{"pageContent":"| 308 S. Sage Ave. | Mobile | AL | 36606 | None | 1183960 |\n| 3715 W Anthem Way, Suite 110, Office 7 | Anthem | AZ | 85086 | None | 2189734 |\n| 3830 N. Morning Dove Circle | Mesa | AZ | 85207 | None | 1769884 |\n| 18506 East Pine Barrens Ave | Queen Creek | AZ | 85142 | None | 2383535 |\n| 14362 N Frank Lloyd Wright Blvd., Suite 1360 | Scottsdale | AZ | 85260 | None | 2284079 |\n| 2035 Corte Del Nogal, Suite 110 | Carlsbad | CA | 92011 | None | 2463790 |","metadata":{"source":"limits2023.md"}}],["57",{"pageContent":"| 2035 Corte Del Nogal, Suite 110 | Carlsbad | CA | 92011 | None | 2463790 |\n| 3914 Park Drive, #80 | El Dorado Hills | CA | 95762 | None | 2258112 |\n| 3184 N Street | Sacramento | CA | 95816 | Street Home Lending | 2084239 |\n| 422 Century Park Dr, Suite C | Yuba City | CA | 95991 | None | 2051563 |\n| 1210 Del Prado Blvd. S | Cape Coral | FL | 33990 | None | 2181596 |\n| 8300 College Parkway, Suite 203 | Fort Myers | FL | 33919 | None | 2152715 |","metadata":{"source":"limits2023.md"}}],["58",{"pageContent":"| 8300 College Parkway, Suite 203 | Fort Myers | FL | 33919 | None | 2152715 |\n| 774 North State Rd. 13, #15 | Jacksonville | FL | 32259 | None | 2266429 |\n| 2232 Heritage Drive | Lakeland | FL | 33801 | None | 1449455 |\n| 195 Wekiva Springs Rd, Ste 103 | Longwood | FL | 32779 | None | 384346 |\n| 1000 Legion Place, Suite 800 | Orlando | FL | 32801 | None | 2167551 |\n| 223 West Gregory St | Pensacola | FL | 32502 | None | 1696637 |","metadata":{"source":"limits2023.md"}}],["59",{"pageContent":"| 223 West Gregory St | Pensacola | FL | 32502 | None | 1696637 |\n| 213 S Dillard St, Suite 220H | Winter Garden | FL | 34787 | None | 1911868 |\n| 19627 Lagrange Rd | Mokena | IL | 60448 | None | 1840276 |\n| 200 S. West Street | Crown Point | IN | 46307 | None | 2148792 |\n| 14074 Trade Center Dr, Suite 246 | Fishers | IN | 46038 | None | 1796042 |\n| 8332 Kennedy Ave | Highland | IN | 46322 | None | 2068118 |","metadata":{"source":"limits2023.md"}}],["60",{"pageContent":"| 8332 Kennedy Ave | Highland | IN | 46322 | None | 2068118 |\n| 16095 Prosperity Drive, Suite 101 | Noblesville | IN | 46060 | None | 2413864 |\n| 2832 Shepherdsville Rd, STE B | Elizabethtown | KY | 42701 | None | 2458867 |\n| 2357 Huguenard Dr., Suites 100 | Lexington | KY | 40503 | None | 1844489 |\n| 2035 Regency Road, Suite 2 | Lexington | KY | 40503 | None | 2461367 |\n| 101 Bullitt Ln, Suite 110 | Louisville | KY | 40222 | None | 1844389 |","metadata":{"source":"limits2023.md"}}],["61",{"pageContent":"| 101 Bullitt Ln, Suite 110 | Louisville | KY | 40222 | None | 1844389 |\n| 67 Merriam Ave, Unit 1F | Leominster | MA | 1453 | None | 2068942 |\n| 824 Bridge St. NW, Suite 1 | Grand Rapids | MI | 49504 | My City Mortgage | 2151691 |\n| 7655 Washington Ave. S | Edina | MN | 55439 | None | 2092051 |\n| 407 S. Pennsylvania Avenue, Suite 206 | Joplin | MO | 64801 | None | 2222578 |\n| 6668 US Highway 98, Suite D | Hattiesburg | MS | 39402 | None | 2183899 |","metadata":{"source":"limits2023.md"}}],["62",{"pageContent":"| 6668 US Highway 98, Suite D | Hattiesburg | MS | 39402 | None | 2183899 |\n| 108 1/2 South Broadway Ave. | Red Lodge | MT | 59068 | None | 2073332 |\n| 2015 Ayrsley Town Blvd., Suite 302B | Charlotte | NC | 28273 | None | 2286214 |\n| 2815 Charles Blvd., Suite A | Greenville | NC | 27858 | None | 2370021 |\n| 7201 W Lake Mead Blvd, Suite 250 | Las Vegas | NV | 89128 | None | 2469424 |\n| 6005 Plumas St, Suite 100 | Reno | NV | 89519 | None | 1847297 |","metadata":{"source":"limits2023.md"}}],["63",{"pageContent":"| 6005 Plumas St, Suite 100 | Reno | NV | 89519 | None | 1847297 |\n| 109 W Main St. | Chillicothe | OH | 45601 | None | 1040830 |\n| 555 S. Front Street, Suite 150 | Columbus | OH | 43215 | Total Choice Mortgage | 1630399 |\n| 3225 Harding Highway | Lima | OH | 45804 | None | 2379641 |\n| 165 W Center St., STE LL-1 | Marion | OH | 43302 | None | 2338109 |\n| 613 Chillicothe Street, Ste. 204 | Portsmouth | OH | 45662 | None | 2435153 |","metadata":{"source":"limits2023.md"}}],["64",{"pageContent":"| 613 Chillicothe Street, Ste. 204 | Portsmouth | OH | 45662 | None | 2435153 |\n| 6060 Renaissance Place, Suite E | Toledo | OH | 43623 | None | 1126687 |\n| 2216 NW 164th St., Ste. A | Edmond | OK | 73013 | None | 2379172 |\n| 706 W. Sheridan Avenue, Ste. B | Oklahoma City | OK | 73102 | None | 2110966 |\n| 5201 N Shartel | Oklahoma City | OK | 73118 | None | 2107959 |\n| 14816 Serenita Ave | Oklahoma City | OK | 73134 | None | 2096090 |","metadata":{"source":"limits2023.md"}}],["65",{"pageContent":"| 14816 Serenita Ave | Oklahoma City | OK | 73134 | None | 2096090 |\n| 3019 Alexander Lane NE | Albany | OR | 97321 | None | 2385554 |\n| 825 NE Multnomah Street, Ste 250 | Portland | OR | 97232 | None | 2371185 |\n| 222 NW 7th St., #102 | Redmond | OR | 97756 | None | 2401028 |\n| 39330 Proctor Blvd. | Sandy | OR | 97055 | None | 2167223 |\n| 412 Washington St. | The Dalles | OR | 97058 | Platinum Mortgage | 2368920 |","metadata":{"source":"limits2023.md"}}],["66",{"pageContent":"| 412 Washington St. | The Dalles | OR | 97058 | Platinum Mortgage | 2368920 |\n| 19824 SW 72nd Ave., Ste 101 | Tualatin | OR | 97062 | Capital Hill Mortgage | 2361688 |\n| 1439 Monroe Avenue, Unit 2 | Dunmore | PA | 18512 | My City Mortgage | 1978621 |\n| 400 Northampton Street, Suite 506, 507, 508, 509, 600, 601 & 602 | Easton | PA | 18042 | My City Mortgage | 2226087 |\n| 310 West Harford St, Suite 2 | Milford | PA | 18337 | My City Mortgage | 1980460 |\n| 100 Chestnut Street | Philadelphia | PA | 19106 | My City Mortgage | 1967431 |","metadata":{"source":"limits2023.md"}}],["67",{"pageContent":"| 100 Chestnut Street | Philadelphia | PA | 19106 | My City Mortgage | 1967431 |\n| 676 Swedesford Rd. STE 140 Office #107 | Wayne | PA | 19087 | None | 2423200 |\n| 107 Cedar Lake Court | Greenwood | SC | 29649 | None | 2329920 |\n| 104 College St. | Fayetteville | TN | 37334 | None | 2396039 |\n| 109 Suburban Rd, Suite 103 | Knoxville | TN | 37923 | None | 1881720 |\n| 6465 N. Quail Hollow Road, Suite 200 | Memphis | TN | 38120 | None | 260955 |","metadata":{"source":"limits2023.md"}}],["68",{"pageContent":"| 6465 N. Quail Hollow Road, Suite 200 | Memphis | TN | 38120 | None | 260955 |\n| 6900 Lenox Village Dr, Suite 18 | Nashville | TN | 37211 | None | 1790847 |\n| 1301 S. Capital of Texas Hwy, Ste. B-125, Ofc 110 & 112 | Austin | TX | 78746 | Hometown Texas | 2108389 |\n| 481 Stephen F Austin Dr. | Conroe | TX | 77302 | None | 2379450 |\n| 13850 Gulf Freeway, Suite 207 | Houston | TX | 77034 | None | 1590999 |\n| 1013 W Beauregard Ave. | San Angelo | TX | 76901 | None | 2299465 |","metadata":{"source":"limits2023.md"}}],["69",{"pageContent":"| 1013 W Beauregard Ave. | San Angelo | TX | 76901 | None | 2299465 |\n| 7925 S. Broadway Ave., Bldg. 11, Ste. 1161 | Tyler | TX | 75703 | None | 2046001 |\n| 14201 RR 12 Suite 3 | Wimberley | TX | 78676 | None | 2438051 |\n| 9000 Center St., Suite 200 | Manassas | VA | 20110 | None | 2249815 |\n| 30741 3rd Avenue, Suite 162 | Black Diamond | WA | 98010 | None | 2309298 |\n| 19125 North Creek Parkway, Suite 210 | Bothell | WA | 98011 | TILA MORTGAGE | 1812056 |","metadata":{"source":"limits2023.md"}}],["70",{"pageContent":"| 19125 North Creek Parkway, Suite 210 | Bothell | WA | 98011 | TILA MORTGAGE | 1812056 |\n| 321 NE Birch Street | Camas | WA | 98607 | None | 2413684 |\n| 1516 9th Ave. N | Edmonds | WA | 98020 | TILA Mortgage | 1966490 |\n| 5151 Borgen Blvd., Suite 101C | Gig Harbor | WA | 98332 | BRYTE HOME LOANS | 2225407 |\n| 2607 Bridgeport Way W, Ste 2M | University Place | WA | 98466 | None | 2275901 |\n| 10000 NE 7th Ave, Suite 215 | Vancouver | WA | 98685 | None | 2101479 |","metadata":{"source":"limits2023.md"}}],["71",{"pageContent":"| 10000 NE 7th Ave, Suite 215 | Vancouver | WA | 98685 | None | 2101479 |\n| 1410 Plaza Way, Suite B | Walla Walla | WA | 99362 | None | 2354656 |\n| 115A Davidson Ave. | Woodland | WA | 98674 | None | 2368716 |\n| 825 US Highway 8, Ste. 2A | St. Croix Falls | WI | 54024 | None | 2397440 |\n| 6421 US Rt. 60 East | Barboursville | WV | 25504 | None | 1897464 |\n| 670 Jackson St., PO Box 774 | Afton | WY | 83110 | Capital Hill Mortgage | 2401204 |","metadata":{"source":"limits2023.md"}}],["72",{"pageContent":"| 670 Jackson St., PO Box 774 | Afton | WY | 83110 | Capital Hill Mortgage | 2401204 |\n| 167 Carter View Drive | Cody | WY | 82414 | None | 2065693 |","metadata":{"source":"limits2023.md"}}]]
--------------------------------------------------------------------------------
/data/hnswlib.index:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hillis/chat-your-data/b8040e96622da41a3c7a39164e24a87b104dac35/data/hnswlib.index
--------------------------------------------------------------------------------
/graphqlspec/fhaincomelimits.md:
--------------------------------------------------------------------------------
1 | FHA Loan Requirements
2 | Borrowers who are interested in buying a home with an FHA loan with the low down payment amount of 3.5% must have a minimum FICO score of 580 to qualify. A lower credit score than 580 doesn’t necessarily exclude you from FHA loan eligibility if you have a minimum down payment of 10%.
3 | There are other requirements for FHA loans in addition to credit score and certain down payment amount. Here is the complete list of FHA loan requirements, which are set by the Federal Housing Administration:
4 |
5 | 1) Steady Employment History
6 | Borrowers must be able to demonstrate a steady employment history or have been working for the same employer for the past two years.
7 |
8 | 2) Social Security Number
9 | Borrowers must have a valid social security number, lawfully reside in the U.S. and be of legal age to sign a mortgage in their respective state at the time of application.
10 |
11 | 3) Down-Payment
12 | Borrowers must put a minimum down payment of 3.5%, which can be gifted by a family member.
13 |
14 | 4) Owner-Occupied Residence
15 | New FHA loans are only available for primary residence occupancy. You must live in the home as your primary residence after purchase. FHA loans are designed to encourage home-ownership. The owner-occupancy requirement prevents investors from buying the homes and renting them out.
16 |
17 | 5) Property Appraisal
18 | Borrowers are required to have a property appraisal from a FHA-approved appraiser. The property must meet certain minimum standards at appraisal. If the home you want to purchase does not meet these standards and a seller will not agree to the required repairs, your only option is to pay for the required repairs at closing (to be held in escrow until the repairs are complete).
19 |
20 | 6) Front-End Ratio
21 | Borrowers are generally required to have a front-end ratio (mortgage payment plus HOA fees, property taxes, mortgage insurance, homeowners insurance) of less than 31% of their gross income. Sometimes, you may be approved with as high a percentage as 40% but your lender will be required to provide justification as to why they believe the mortgage presents an acceptable risk. The lender must then include any compensating factors used for loan approval.
22 |
23 | 7) Back-End Ratio
24 | Borrowers are required to have a back-end ratio (mortgage plus all your monthly debt, i.e., credit card payment, car payment, student loans, etc.) of less than 43% of their gross income. Sometimes, you may be approved with as high a percentage as 50% but your lender will be required to provide justification as to why they believe the mortgage presents an acceptable risk. The lender must include any compensating factors used for loan approval.
25 |
26 | 8) Minimum Credit Score
27 | Borrowers are required to have a minimum credit score of 580 for maximum financing with a minimum down payment of 3.5%. Borrowers are required to have a minimum credit score of 500-579 for maximum loan-to-value (LTV) of 90% with a minimum down payment of 10%. FHA-qualified lenders determine on a case-by-case basis an applicants’ credit worthiness.
28 |
29 | 9) Bankruptcy
30 | Borrowers must be two years out of bankruptcy and have re-established good credit. Some exceptions can be made if there were extenuating circumstances beyond your control that caused the bankruptcy and you have managed your money in a responsible manner.
31 |
32 | 10) Foreclosure
33 | Borrowers must be three years out of foreclosure and have re-established good credit. Some exceptions can be made if there were extenuating circumstances and you’ve improved your credit. Not being able to sell your home because you had to move to a new area does not qualify as an exception to the three-year foreclosure guideline.
34 |
35 | 11) Loan Limits
36 | The Federal Housing Administration is the one that sets maximum mortgage limits for FHA loans that vary by state and county. Loan limits range from $275,665 to $721,050 for a 1 living-unit property depending upon where you are buying a home.
37 |
38 |
39 |
40 | FHA and conventional Loan limits vary based on the number of living-units on the property. FHA loans are only allowed on 1 to 4 living-unit properties. These 1 to 4 unit properties can be purchased with an FHA loan as long as the owner occupies one of the unit. Properties with over 4 units are considered commercial and do not quality for FHA or conventional loans.
41 |
42 | Madison County Limits
43 | Limits for FHA Loans in Madison County, Alabama range from $472,030 for 1 living-unit homes to $907,900 for 4 living-units. Conventional Loan Limits in Madison County are $726,200 for 1 living-unit homes to $1,396,800 for 4 living-units. The 2023 Home Equity Conversion Mortgage (HECM) limits in Madison County is $1,089,300. HECM limit does not depend on the size of the home.
44 |
45 | Conventional Loans
46 | Conventional loans (also called "conforming") are loans that conform to the requirements set by Fannie Mae and Freddie Mac. Fannie Mae and Freddie Mac buy home loans from lenders to provide liquidity. This allows lenders to continue lending to home buyers. Otherwise, banks might not have enough money on hand continue lending. Fannie and Freddie set strict standards for the types of loans they will buy.
47 |
48 | To see if a home qualifies for an FHA loan, the property must be appraised by an approved FHA appraiser.
49 |
50 | VA Loans are similar to FHA Loans in that it allows you to buy a home with very little money down. However VA Loans are only available to veterans of the Armed Forces. With VA loans the Department of Veterans Affairs guarantees the loan on the veteran's behalf. The maximum the VA will guarantee is set to the same amount as the single-family Fannie/Freddie Loan Limit. So the Madison County, AL 2023 VA Loan Limit is $726,200
51 |
52 | The minimum loan amount in Madison County is $5,000 dollars and may go up to $907,900 depending on home size and loan type. In order to qualify for an FHA loan, you must be planning to live in the home. Although a loan can include some renovation costs, FHA loans cannot be used for real estate investments in Madison County.
53 |
54 | Table below shows the Loan Limit for the Counties in Alabama for Single Family Unit and the limit for a Four-Plex.
55 |
56 | | County | Single Family Unit Limit | Four-Plex Limit |
57 | |-------------------|----------------------------|---------------------------|
58 | | Autauga County | $472,030 | $907,900 |
59 | | Baldwin County | $472,030 | $907,900 |
60 | | Barbour County | $472,030 | $907,900 |
61 | | Bibb County | $472,030 | $907,900 |
62 | | Blount County | $472,030 | $907,900 |
63 | | Bullock County | $472,030 | $907,900 |
64 | | Butler County | $472,030 | $907,900 |
65 | | Calhoun County | $472,030 | $907,900 |
66 | | Chambers County | $472,030 | $907,900 |
67 | | Cherokee County | $472,030 | $907,900 |
68 | | Chilton County | $472,030 | $907,900 |
69 | | Choctaw County | $472,030 | $907,900 |
70 | | Clarke County | $472,030 | $907,900 |
71 | | Clay County | $472,030 | $907,900 |
72 | | Cleburne County | $472,030 | $907,900 |
73 | | Coffee County | $472,030 | $907,900 |
74 | | Colbert County | $472,030 | $907,900 |
75 | | Conecuh County | $472,030 | $907,900 |
76 | | Coosa County | $472,030 | $907,900 |
77 | | Covington County | $472,030 | $907,900 |
78 | | Crenshaw County | $472,030 | $907,900 |
79 | | Cullman County | $472,030 | $907,900 |
80 | | Dale County | $472,030 | $907,900 |
81 | | Dallas County | $472,030 | $907,900 |
82 | | Dekalb County | $472,030 | $907,900 |
83 | | Elmore County | $472,030 | $907,900 |
84 | | Escambia County | $472,030 | $907,900 |
85 | | Etowah County | $472,030 | $907,900 |
86 | | Fayette County | $472,030 | $907,900 |
87 | | Franklin County | $472,030 | $907,900 |
88 | | Geneva County | $472,030 | $907,900 |
89 | | Greene County | $472,030 | $907,900 |
90 | | Hale County | $472,030 | $907,900 |
91 | | Henry County | $472,030 | $907,900 |
92 | | Houston County | $472,030 | $907,900 |
93 | | Jackson County | $472,030 | $907,900 |
94 | | Jefferson County | $472,030 | $907,900 |
95 | | Lamar County | $472,030 | $907,900 |
96 | | Lauderdale County | $472,030 | $907,900 |
97 | | Lawrence County | $472,030 | $907,900 |
98 | | Lee County | $472,030 | $907,900 |
99 | | Limestone County | $472,030 | $907,900 |
100 | | Lowndes County | $472,030 | $907,900 |
101 | | Macon County | $472,030 | $907,900 |
102 | | Madison County | $472,030 | $907,900 |
103 | | Marengo County | $472,030 | $907,900 |
104 | | Marion County | $472,030 | $907,900 |
105 | | Marshall County | $472,030 | $907,900 |
106 | | Mobile County | $472,030 | $907,900 |
107 | | Monroe County | $472,030 | $907,900 |
108 | | Montgomery County | $472,030 | $907,900 |
109 | | Morgan County | $472,030 | $907,900 |
110 | | Perry County | $472,030 | $907,900 |
111 | | Pickens County | $472,030 | $907,900 |
112 | | Pike County | $472,030 | $907,900 |
113 | | Randolph County | $472,030 | $907,900 |
114 | | Russell County | $472,030 | $907,900 |
115 | | Shelby County | $472,030 | $907,900 |
116 | | St. Clair County | $472,030 | $907,900 |
117 | | Sumter County | $472,030 | $907,900 |
118 | | Talladega County | $472,030 | $907,900 |
119 | | Tallapoosa County | $472,030 | $907,900 |
120 | | Tuscaloosa County | $472,030 | $907,900 |
121 | | Walker County | $472,030 | $907,900 |
122 | | Washington County | $472,030 | $907,900 |
123 | | Wilcox County | $472,030 | $907,900 |
124 | | Winston County | $472,030 | $907,900 |
125 |
126 |
127 |
128 | Table below shows the Loan Limit for each state of in America for Single Family Unit and the limit for a Four-Plex.
129 |
130 | | State | Single Family Unit Limit | Four-Plex Limit |
131 | |----------------------|-------------------|--------------------|
132 | | Alabama | $472,030 | $907,900 |
133 | | Alaska | $472,030 | $1,127,900 |
134 | | American Samoa | $472,030 | $907,900 |
135 | | Arizona | $472,030 | $1,019,550 |
136 | | Arkansas | $472,030 | $907,900 |
137 | | California | $472,030 | $2,095,200 |
138 | | Colorado | $472,030 | $2,095,200 |
139 | | Connecticut | $472,030 | $1,360,100 |
140 | | Delaware | $472,030 | $1,017,300 |
141 | | District Of Columbia | $1,089,300 | $2,095,200 |
142 | | Florida | $472,030 | $1,680,800 |
143 | | Georgia | $472,030 | $1,138,950 |
144 | | Guam | $563,500 | $1,083,650 |
145 | | Hawaii | $517,500 | $1,879,850 |
146 | | Idaho | $472,030 | $2,095,200 |
147 | | Illinois | $472,030 | $907,900 |
148 | | Indiana | $472,030 | $907,900 |
149 | | Iowa | $472,030 | $907,900 |
150 | | Kansas | $472,030 | $907,900 |
151 | | Kentucky | $472,030 | $907,900 |
152 | | Louisiana | $472,030 | $907,900 |
153 | | Maine | $472,030 | $973,100 |
154 | | Mariana Islands | $472,030 | $1,023,950 |
155 | | Maryland | $472,030 | $2,095,200 |
156 | | Massachusetts | $472,030 | $2,095,200 |
157 | | Michigan | $472,030 | $907,900 |
158 | | Minnesota | $472,030 | $990,800 |
159 | | Mississippi | $472,030 | $907,900 |
160 | | Missouri | $472,030 | $907,900 |
161 | | Montana | $472,030 | $1,353,500 |
162 | | Nebraska | $472,030 | $1,161,050 |
163 | | Nevada | $472,030 | $1,265,000 |
164 | | New Hampshire | $472,030 | $1,592,350 |
165 | | New Jersey | $472,030 | $2,095,200 |
166 | | New Mexico | $472,030 | $1,121,250 |
167 | | New York | $472,030 | $2,095,200 |
168 | | North Carolina | $472,030 | $1,548,100 |
169 | | North Dakota | $472,030 | $907,900 |
170 | | Ohio | $472,030 | $939,900 |
171 | | Oklahoma | $472,030 | $907,900 |
172 | | Oregon | $472,030 | $1,326,950 |
173 | | Pennsylvania | $472,030 | $2,095,200 |
174 | | Puerto Rico | $472,030 | $1,023,950 |
175 | | Rhode Island | $661,250 | $1,271,650 |
176 | | South Carolina | $472,030 | $1,035,000 |
177 | | South Dakota | $472,030 | $907,900 |
178 | | Tennessee | $472,030 | $1,711,750 |
179 | | Texas | $472,030 | $1,099,150 |
180 | | Utah | $472,030 | $2,095,200 |
181 | | Vermont | $472,030 | $946,550 |
182 | | Virgin Islands | $472,030 | $1,851,100 |
183 | | Virginia | $472,030 | $2,095,200 |
184 | | Washington | $472,030 | $1,879,850 |
185 | | West Virginia | $472,030 | $2,095,200 |
186 | | Wisconsin | $472,030 | $990,800 |
187 | | Wyoming | $472,030 | $2,095,200 |
188 |
--------------------------------------------------------------------------------
/ingest.ts:
--------------------------------------------------------------------------------
1 | import { HNSWLib } from "langchain/vectorstores";
2 | import { OpenAIEmbeddings } from "langchain/embeddings";
3 | import { RecursiveCharacterTextSplitter } from "langchain/text_splitter";
4 | import { TextLoader } from "langchain/document_loaders";
5 |
6 | const FILENAME = "limits2023.md";
7 |
8 | export const run = async () => {
9 | const loader = new TextLoader(FILENAME);
10 | const rawDocs = await loader.load();
11 | console.log("Loader created.");
12 | /* Split the text into chunks */
13 | const textSplitter = new RecursiveCharacterTextSplitter({
14 | chunkSize: 1000,
15 | chunkOverlap: 200,
16 | });
17 | const docs = await textSplitter.splitDocuments(rawDocs);
18 | console.log("Docs splitted.");
19 |
20 | console.log("Creating vector store...");
21 | /* Create the vectorstore */
22 | const vectorStore = await HNSWLib.fromDocuments(docs, new OpenAIEmbeddings());
23 | await vectorStore.save("data");
24 | };
25 |
26 | (async () => {
27 | await run();
28 | console.log("done");
29 | })();
30 |
--------------------------------------------------------------------------------
/next.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('next').NextConfig} */
2 | const nextConfig = {
3 | reactStrictMode: true,
4 | }
5 |
6 | export default nextConfig
7 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "chat-your-data",
3 | "version": "0.0.4",
4 | "private": true,
5 | "type": "module",
6 | "scripts": {
7 | "dev": "next dev",
8 | "build": "next build",
9 | "start": "next start",
10 | "lint": "next lint",
11 | "download": "sh ingest/download.sh",
12 | "ingest": "tsx -r dotenv/config ingest.ts"
13 | },
14 | "dependencies": {
15 | "@emotion/react": "^11.10.5",
16 | "@emotion/styled": "^11.10.5",
17 | "@microsoft/fetch-event-source": "^2.0.1",
18 | "@mui/material": "^5.11.4",
19 | "@vercel/analytics": "^0.1.11",
20 | "dotenv": "^16.0.3",
21 | "eslint": "8.34.0",
22 | "eslint-config-next": "^13.2.4",
23 | "hnswlib-node": "^1.4.2",
24 | "langchain": "0.0.22",
25 | "next": "^13.2.4",
26 | "openai": "^3.2.1",
27 | "pdfjs-dist": "^3.4.120",
28 | "react": "^18.2.0",
29 | "react-dom": "^18.2.0",
30 | "react-markdown": "^8.0.5",
31 | "remark-gfm": "^3.0.1",
32 | "sharp": "^0.31.3",
33 | "ws": "^8.12.1"
34 | },
35 | "devDependencies": {
36 | "@types/adm-zip": "^0.5.0",
37 | "@types/node": "18.13.0",
38 | "@types/react": "18.0.28",
39 | "@types/react-dom": "18.0.11",
40 | "@types/ws": "^8.5.4",
41 | "cohere-ai": "^5.0.2",
42 | "ts-node": "^10.9.1",
43 | "tsx": "^3.12.3",
44 | "typescript": "4.9.5"
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/pages/_app.tsx:
--------------------------------------------------------------------------------
1 | import '@/styles/globals.css'
2 | import type { AppProps } from 'next/app'
3 | import Script from 'next/script'
4 | import { Analytics } from "@vercel/analytics/react";
5 |
6 | export default function App({ Component, pageProps }: AppProps) {
7 | return (
8 | <>
9 |
10 |
247 |