You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-12Lines changed: 23 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -17,33 +17,39 @@
17
17
18
18
A [React](https://react.dev/) + [AWS Serverless](https://aws.amazon.com/serverless/) full stack implementation of the [30 example applications](https://platform.openai.com/examples) found in the official OpenAI API documentation. This repository is used as an instructional tool for the YouTube channel "[Full Stack With Lawrence](https://youtube.com/@FullStackWithLawrence)" as well as for University of British Columbia course, "[Artificial Intelligence Cloud Technology Implementation](https://extendedlearning.ubc.ca/courses/artificial-intelligence-cloud-technology-implementation/mg202)" taught by Lawrence McDaniel.
19
19
20
+
_New in version 0.10.x: A new chat app named "OpenAI Function Calling". See [lambda_openai_function](https://github.com/FullStackWithLawrence/aws-openai/tree/main/api/terraform/python/openai_api/lambda_openai_function) for examples including the fully implemented "[get_current_weather()](https://platform.openai.com/docs/guides/function-calling)" from The official OpenAI API documentation, and also a fun example of how get OpenAI to not only recognize you but also say flowery nice things about you!_
**IMPORTANT DISCLAIMER: AWS' Lambda service has a hard 29-second timeout. OpenAI API calls often take longer than this, in which case the AWS API Gateway endpoint will return a 504 "Gateway timeout error" response to the React client. This happens frequently with apps created using chatgpt-4. Each of the 30 OpenAI API example applications are nonetheless implemented exactly as they are specified in the official documentation.**
24
+
IMPORTANT DISCLAIMERS:
25
+
26
+
1. AWS' Lambda service has a hard 29-second timeout. OpenAI API calls often take longer than this, in which case the AWS API Gateway endpoint will return a 504 "Gateway timeout error" response to the React client. This happens frequently with apps created using chatgpt-4. Each of the 30 OpenAI API example applications are nonetheless implemented exactly as they are specified in the official documentation.
27
+
28
+
2. Distribution upload packages for AWS Lambda functions as well as AWS Lambda Layers are limited to 50mb (and 250mb unzipped). Often, this poses serious limitations for Layers, which are intended to store your PyPi / NPM package dependencies. Note that incidentally, these code samples are also pretty code scaffolding for alternative Docker-based deployment strategies using Elastic Container Service and/or Elastic Kubernetes Service.
@@ -96,6 +102,11 @@ A REST API implementing each of the [30 example applications](https://platform.o
96
102
-[NodeJS](https://nodejs.org/en/download): used with NPM for local ReactJS developer environment, and for configuring/testing Semantic Release.
97
103
-[Docker Compose](https://docs.docker.com/compose/install/): used by an automated Terraform process to create the AWS Lambda Layer for OpenAI and LangChain.
98
104
105
+
Optional requirements:
106
+
107
+
-[Google Maps API key](https://developers.google.com/maps/documentation/geocoding/overview). This is used the OpenAI API Function Calling coding example, "[get_current_weather()](https://platform.openai.com/docs/guides/function-calling)".
108
+
-[Pinecone API key](https://docs.pinecone.io/docs/quickstart). This is used for OpenAI API Embedding examples.
109
+
99
110
## Documentation
100
111
101
112
Detailed documentation for each endpoint is available here: [Documentation](./doc/examples/)
Fully implements the "[get_current_weather()](https://platform.openai.com/docs/guides/function-calling)" from The official OpenAI API documentation. OpenAI's documentation provides scaffolding for this feature, but falls short of actually providing code that retrieves location-based current weather forecasts.
6
+
7
+
## function_refers_to.py
8
+
9
+
This module demonstrates an alternative implementation of prompt behavior modification involving both Function Calling, plus, dynamic modifications to the system prompt. This example relies on [lambda_config.yaml](./lambda_config.yaml) for personalization data.
returnjson.dumps({"error": "inquiry_type not recognized"})
102
+
returnjson.dumps(lambda_config)
64
103
65
104
66
105
definfo_tool_factory():
@@ -72,11 +111,20 @@ def info_tool_factory():
72
111
"type": "function",
73
112
"function": {
74
113
"name": "get_additional_info",
75
-
"description": "Get additional information about Lawrence McDaniel, full stack web developer and host of YouTube channel FullStackwithLawrence.",
114
+
"description": "Get additional information about Lawrence McDaniel, full stack web developer and host of YouTube channel FullStackwithLawrence. returns a personal bio, contact information, marketing information, client list, education background, professional certifications, etc.",
Lawrence McDaniel is a freelance full-stack web developer and online instructor at University of British Columbia. He has a BS in computer science and mathematics with minors in physics and English from University of North Texas. He was an early employee at three startups that were later acquired by Goldman Sachs, IBM and Deutsche Bank respectively, and has participated in a successful NASDAQ IPO. He has worked as a freelance technology consultant since 1999 and has advised dozens of startups as well as banks, hedge funds and real estate investment funds from around the world including Morgan Stanley, Fortress Investment Group, IBM Seterus, and others.
99
107
He has expertise in data science, financial modeling and forecasting systems, analytics, machine learning, AI, big data, web, mobile, database technology, and Amazon Web Services (AWS) cloud infrastructure. He has 20+ years experience designing high performance, always-up transactional database systems using MySQL, MSSQL Server, Aurora and MongoDB. He also has years of expertise designing high availability, horizontally scalable cloud-based infrastructure environments. In fact, Lawrence is an ambassador for the AWS Activate Program in Mexico, helping startups and early-stage ventures get digital products and services to market using AWS. He advises companies on migration plans to AWS as well as works with early-stage ventures creating new highly scalable back-end environments and implementing continuous integration strategies.
100
108
Lawrence is an angel investor, entrepreneur and company mentor with nearly 25 years of international experience with an emphasis on technology and US-Mexico trade. He has extensive startup, fund raising, business development and M&A experience with alternative investment and disruptive FinTech, edTech and IoT ventures. He is a mentor at Startup Mexico and Angel Ventures in Mexico City, and sits on the boards of edMex and M-Arca Foundation.
101
109
But he’s no stranger to real work either! his family built the house where he grew up in rural northeast Texas, raised their own livestock, and farmed their own crops. He paid his way through college by working for six years during and after high school in various jobs as a printer, cattle hand, carpenter, roofer, sheet rocker, painter, glazier, welder, lumber yard worker, forklift mechanic, truck loader, landscaper and gardener, hot tub installer, janitor, grocery shelf stocker, carpet & commercial floor cleaner, dishwasher, waiter, and cook. During college he worked as a cafeteria food server, a tutor in the university math lab, a calculus paper grader and substitute lecturer for the math department and as a lab assistant for the physics department. Immediately after graduating college he helped launch one the first indoor rock climbing gyms, Exposure Indoor Rock Climbing gym in Carrollton, Texas, while simultaneously covering progress of NAFTA negotiations for a Dallas-based family office.
102
110
Lawrence is fully English/Spanish bilingual and available to travel throughout all of North America.
111
+
profile:
112
+
education:
113
+
- degree: Bachelors of Science
114
+
majors:
115
+
- Computer Science
116
+
- Mathematics
117
+
minors:
118
+
- Physics
119
+
- English
120
+
university: University of North Texas
121
+
year: 1992
122
+
skills:
123
+
- Full Stack Web Development
124
+
- Python
125
+
- ReactJS
126
+
- OpenAI API
127
+
- AWS
128
+
- Kubernetes
129
+
- Docker
130
+
- MySQL
131
+
- MongoDB
132
+
certifications:
133
+
- title: Data Science & Machine Learning - Making Data-driven Decisions
description: A community supported organization focused on providing reliable CI automation tools for Open edX™️ software deployed to Kubernetes with Tutor.
168
+
links:
169
+
- https://github.com/cookiecutter-openedx/
170
+
year: 2022
171
+
- title: Full Stack With Lawrence
172
+
description: A YouTube channel dedicated to teaching full stack web development.
0 commit comments