forked from a16z-infra/ai-getting-started
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ace32fd
Showing
35 changed files
with
6,924 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env*.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "next/core-web-vitals" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env*.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# syntax = docker/dockerfile:1 | ||
|
||
# Adjust NODE_VERSION as desired | ||
ARG NODE_VERSION=18.8.0 | ||
FROM node:${NODE_VERSION}-slim as base | ||
|
||
LABEL fly_launch_runtime="Next.js" | ||
|
||
# Next.js app lives here | ||
WORKDIR /app | ||
|
||
# Set production environment | ||
ENV NODE_ENV=production | ||
|
||
|
||
# Throw-away build stage to reduce size of final image | ||
FROM base as build | ||
|
||
# Install packages needed to build node modules | ||
RUN apt-get update -qq && \ | ||
apt-get install -y python-is-python3 pkg-config build-essential | ||
|
||
# Install node modules | ||
COPY --link package-lock.json package.json ./ | ||
RUN npm ci --include=dev | ||
|
||
# Copy application code | ||
COPY --link . . | ||
|
||
# Build application | ||
RUN npm run build | ||
|
||
# Remove development dependencies | ||
RUN npm prune --omit=dev | ||
|
||
|
||
# Final stage for app image | ||
FROM base | ||
|
||
# Copy built application | ||
COPY --from=build /app /app | ||
|
||
# Start the server by default, this can be overwritten at runtime | ||
EXPOSE 3000 | ||
CMD [ "npm", "run", "start" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 infra-corgi | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Open Mind | ||
|
||
Open source self deployable knowledge base with AI powered search and chat. | ||
|
||
Names | ||
- brainhub | ||
- openmind | ||
- openbrain | ||
- newbrain | ||
- anotherbrain | ||
- thirdbrain | ||
- brainx | ||
- memory | ||
- openmind.site | ||
|
||
keywords | ||
- mind | ||
- brain | ||
- | ||
- knowledge | ||
- memory | ||
- info | ||
- doc, link, too narrow | ||
- | ||
- ama | ||
- | ||
- open | ||
- base | ||
- hub | ||
- x | ||
- hunt | ||
|
||
|
||
What problem does this project solve? | ||
|
||
- I want to have a knowledge base that I can search with AI | ||
- I want to self deploy the knowledge base | ||
|
||
## competitors | ||
https://www.privategpt.io/ | ||
|
||
### Stack | ||
|
||
Auth: Clerk | ||
App logic: next.js | ||
VectorDB: Pinecone | ||
LLM Orchestration: Langchain.js | ||
Models + inference: Replicate | ||
Deployment: Fly | ||
|
||
chatbase/chatpdf | ||
|
||
|
||
## Operations: | ||
### 1. Init a nextjs app https://nextjs.org/docs/getting-started/installation | ||
### 2. Signup and create app on https://clerk.com. Steps to use in nextjs: https://clerk.com/docs/nextjs/get-started-with-nextjs | ||
### 3. Signup on fly and deploy app: https://fly.io/docs/languages-and-frameworks/nextjs/ | ||
### 4. Install langchain.js: https://js.langchain.com/docs/getting-started/install | ||
### 5. https://js.langchain.com/docs/modules/indexes/vector_stores/integrations/pinecone | ||
### 6. https://js.langchain.com/docs/modules/models/llms/integrations#replicate | ||
|
||
|
||
## How does the chat feature work | ||
1. Get content from a link (puppeteer) | ||
2. Split content to smaller chunks if necessary | ||
2. Compute the embeddings of the content | ||
3. Store the embeddings in Pinecone | ||
|
||
Q&A example: https://js.langchain.com/docs/modules/chains/index_related_chains/retrieval_qa | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Investing in Pomelo Care | ||
by Vineeta Agarwala | ||
|
||
“In the United States of America, in the 21st century, being pregnant and giving birth should not carry such great risk. But the truth is…before, during, and after childbirth, women in our nation are dying at a higher rate than any other developed nation in our world. And we know that, for some women, the risk is much higher. When we know that…we need to do something about it.” | ||
|
||
— Vice President Kamala Harris, at the Maternal Day of Action Summit | ||
|
||
## A personal story | ||
I am personally alive thanks to heroic maternal care. My mother was astutely diagnosed with severe preeclampsia, necessitating an emergency airlift and delivery at 29 weeks gestation at an academic medical center in rural Pennsylvania. My entry into the world started with a harrowing 12-week NICU stay. A smart care team and medical innovation like surfactant (discovered just a few years prior for use in preterm babies!) saved my life–and my mother’s life. | ||
|
||
Fast forward a few decades later–and in a full circle moment, I was diagnosed with preeclampsia during my own first pregnancy. Even as a physician myself, with outstanding obstetric care, my journey as a new mom felt bewildering, fragmented, and seemingly devoid of modern technology. I tapered off blood pressure medications myself. The postpartum depression survey felt so cold and impersonal that just the act of filling it out made me upset. I couldn’t stop thinking what a mom with less support would do–what about single moms, moms with multiple kids at home, moms without a blood pressure cuff at home, moms without a PCP, or moms lacking resources for transportation to their OB’s office? I started paying attention to every startup, every non-profit and government initiative, and every innovator in the maternal health space. | ||
|
||
## Pomelo, like the fruit: Extra layers of protection | ||
A few years later, in early 2021, I got a call from Marta, with whom I had previously worked closely at Flatiron Health. She was widely known as a “get stuff done” business development leader and key member of the Flatiron executive leadership team. She was now a mom, too. And, she was about to jump in and become a startup founder/CEO. “I’m thinking about value-based maternity and neonatal care. Want to hear more?” | ||
|
||
By this point, I hardly needed to hear more to be ecstatic. I couldn’t imagine a more effective and purpose-driven operator than Marta for any business–but especially this one. It was also painfully clear that too many growing families in America struggle–and as VP Harris recently highlighted, the maternal mortality rate in the US exceeds that of other high-income countries worldwide by a significant margin. That’s despite spending twice as much–an irony that is begging for new technology, care model innovation, and value-based payment rail redesign. | ||
|
||
“We’re calling it Pomelo,” Marta said. “Like the fruit. It’s a reference to the super thick protective peel that protects the fruit inside.” I loved the idea of a company that paid homage every day to moms (aren’t we all courageous human pomelos!). I also loved that in Marta’s vision, the company would in some sense be a pomelo to our existing healthcare system–a protective care model that wraps around existing obstetrics providers, NICUs and labor & delivery wards, Medicaid plans, commercial insurance plans, and employers–to continuously improve the maternal and neonatal care journey for patients, provide always-on triage, and lower the catastrophic suffering and cost associated with poor outcomes. | ||
|
||
Our early conversations all took place during the early part of the pandemic, while Marta was actually running a 9-month long customer empathy exercise while pregnant herself with her second child in rural Georgia, over an hour away from an OB! Unable to meet in-person, we sent Marta a crate of grapefruits via Instacart, emailed her a recipe for a pomelo basil mocktail, and got together over “Zoom drinks” to shake hands on co-leading the company’s Seed financing alongside fantastic partners at First Round Capital. | ||
|
||
## So we need to “do something” about maternal health–but what? | ||
Value-based care models are proliferating across healthcare, but maternity presents some particularly unique opportunities–and unique challenges. Unlike primary care, and unlike chronic disease management, the maternity care journey has a very clear, near-term endpoint, with a clear definition of success: Healthy delivery for mom and baby! This creates the opportunity for nimble care model iteration, innovative adoption of technology (e.g., from risk prediction to remote monitoring to symptom management), and relatively rapid ROI demonstration for payor and employer partners. | ||
|
||
However, it also necessitates a deep commitment to integrate with our existing healthcare fabric: Obstetricians practicing all over the country, hospitals, health systems, labor & delivery wards, NICUs, and existing maternal care programs. These represent an expensive and valuable care delivery infrastructure without which nearly 4 million babies simply cannot be safely born every year in the US. Especially for high-risk pregnancies and high-risk moms, this infrastructure is essential. | ||
|
||
As we have seen the Pomelo team build out their virtual clinic, care model, and software platform, they are dedicated to a few key principles which we believe are absolutely critical to building a scalable company in this space. | ||
|
||
- Deliver 24/7 care for both mom AND baby. Maternal and neonatal care go hand-in-hand, and a trusted relationship with patient families can and should serve both patients. Cost savings from better maternal care are also often realized in neonatal care. | ||
- Enable rather than replace existing OB providers. For those who have read my prior investment blog posts, you know that I love enablement business models. They allow a company like Pomelo to empower capable physicians already embedded in their communities, avoid the cost structure of becoming the obstetrics office/birthing center, and drive savings with an efficient wrapper care model. | ||
- Build a solution that pays for itself (via savings to payors and employers), and remains free to patients and individual providers. Socioeconomic inequality and the inability to pay for appropriate care is a driver of the maternal health crisis, and adding out-of-pocket costs to patients is not a sustainable path forward. | ||
- Use cutting edge software and technology to do all of the above. Look for every opportunity available to make our care more available, more accurate, more actionable, and ultimately more impactful. Use data to understand what is working, and what is not. | ||
We are delighted to see the Pomelo team scale their offering towards serving thousands and even millions of moms, babies, and growing families across the country, across every part of our diverse society. It is a privilege to lead Pomelo’s Series A and serve on the company’s board. Join us! | ||
|
||
*** | ||
|
||
The views expressed here are those of the individual AH Capital Management, L.L.C. (“a16z”) personnel quoted and are not the views of a16z or its affiliates. Certain information contained in here has been obtained from third-party sources, including from portfolio companies of funds managed by a16z. While taken from sources believed to be reliable, a16z has not independently verified such information and makes no representations about the enduring accuracy of the information or its appropriateness for a given situation. In addition, this content may include third-party advertisements; a16z has not reviewed such advertisements and does not endorse any advertising content contained therein. | ||
|
||
This content is provided for informational purposes only, and should not be relied upon as legal, business, investment, or tax advice. You should consult your own advisers as to those matters. References to any securities or digital assets are for illustrative purposes only, and do not constitute an investment recommendation or offer to provide investment advisory services. Furthermore, this content is not directed at nor intended for use by any investors or prospective investors, and may not under any circumstances be relied upon when making a decision to invest in any fund managed by a16z. (An offering to invest in an a16z fund will be made only by the private placement memorandum, subscription agreement, and other relevant documentation of any such fund and should be read in their entirety.) Any investments or portfolio companies mentioned, referred to, or described are not representative of all investments in vehicles managed by a16z, and there can be no assurance that the investments will be profitable or that other investments made in the future will have similar characteristics or results. A list of investments made by funds managed by Andreessen Horowitz (excluding investments for which the issuer has not provided permission for a16z to disclose publicly as well as unannounced investments in publicly traded digital assets) is available at https://a16z.com/investments/. | ||
|
||
Charts and graphs provided within are for informational purposes solely and should not be relied upon when making any investment decision. Past performance is not indicative of future results. The content speaks only as of the date indicated. Any projections, estimates, forecasts, targets, prospects, and/or opinions expressed in these materials are subject to change without notice and may differ or be contrary to opinions expressed by others. Please see https://a16z.com/disclosures for additional important information. | ||
|
||
June 8, 2023 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# fly.toml app configuration file generated for ai-template on 2023-06-13T10:46:13+08:00 | ||
# | ||
# See https://fly.io/docs/reference/configuration/ for information about how to use this file. | ||
# | ||
|
||
app = "ai-template" | ||
primary_region = "sin" | ||
|
||
[http_service] | ||
internal_port = 3000 | ||
force_https = true | ||
auto_stop_machines = true | ||
auto_start_machines = true | ||
min_machines_running = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = {} | ||
|
||
module.exports = nextConfig |
Oops, something went wrong.