Skip to content

Commit

Permalink
✨ feat(extension): add systemMessage param and other OPENAI models
Browse files Browse the repository at this point in the history
  • Loading branch information
shiftEscape committed Sep 28, 2024
1 parent 454c8a9 commit 2401670
Show file tree
Hide file tree
Showing 10 changed files with 1,434 additions and 1,180 deletions.
11 changes: 10 additions & 1 deletion firestore-chatgpt-bot/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,13 @@

## Version 0.0.3

- Added new `GPT-4o` to the `MODEL` options. [Learn more here.](https://platform.openai.com/docs/models/gpt-4o)
- Added new `GPT-4o` to the `MODEL` options. [Learn more here.](https://platform.openai.com/docs/models/gpt-4o)

## Version 0.1.0

- Added `systemMessage` to configurable paramaters.
- Included (4) language models to the `MODEL` option. [Learn more here.](https://platform.openai.com/docs/models)
- GPT-4o mini `gpt-4o-mini`
- o1-preview `o1-preview`
- o1-mini `o1-mini`
- GPT-4 Turbo `gpt-4-turbo`
23 changes: 20 additions & 3 deletions firestore-chatgpt-bot/extension.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: firestore-chatgpt-bot
version: 0.0.3 # Follow semver versioning
version: 0.1.0 # Follow semver versioning
specVersion: v1beta # Version of the Firebase Extensions specification

displayName: Chatbot with ChatGPT
Expand Down Expand Up @@ -78,9 +78,9 @@ params:
label: OpenAI API Key
description: >-
API Key to be used on OpenAI Chat Completion API
We recommend creating a new [KEY](https://platform.openai.com/) or use an existing one.
We recommend creating a new [KEY](https://platform.openai.com/api-keys) or use an existing one.
type: secret
example: sk-xxxxxxxxxxxxxxxxxxxxxxxxxxx
example: sk-proj-xxxxxxxxxxxxxxxxxxxxxxxxxxx
required: true

- param: COLLECTION_NAME
Expand Down Expand Up @@ -113,6 +113,15 @@ params:
required: true
immutable: false

- param: SYSTEM_MESSAGE
label: System Message
description: >-
The default message that acts as an instruction for the model, ensuring it responds appropriately to the your queries.
type: string
example: You're an AI language model developed by OpenAI. Provide the user with clear and helpful assistance.
required: false
immutable: false

- param: LOCATION
label: Cloud Functions Location
description: >-
Expand Down Expand Up @@ -174,6 +183,14 @@ params:
options:
- label: GPT-4o
value: gpt-4o
- label: GPT-4o mini
value: gpt-4o-mini
- label: o1-preview
value: o1-preview
- label: o1-mini
value: o1-mini
- label: GPT-4 Turbo
value: gpt-4-turbo
- label: GPT-4 Turbo Preview
value: gpt-4-turbo-preview
- label: GPT-4 1106 Preview
Expand Down
4 changes: 4 additions & 0 deletions firestore-chatgpt-bot/functions/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ lib/
*.log

node_modules/

_emulator/

.DS_Store
72 changes: 68 additions & 4 deletions firestore-chatgpt-bot/functions/_emulator/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,69 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
firebase-debug.log*
firebase-debug.*.log*

# Firebase logs
*-debug.log
**/*.env
**/*.local
# Firebase cache
.firebase/

# Firebase config

# Uncomment this if you'd like others to create their own Firebase project.
# For a team working on the same Firebase project(s), it is recommended to leave
# it commented so all members can deploy to the same project(s) in .firebaserc.
# .firebaserc

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# dataconnect generated files
.dataconnect
6 changes: 3 additions & 3 deletions firestore-chatgpt-bot/functions/_emulator/firebase.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"emulators": {
"firestore": {
"port": 8080
},
"functions": {
"port": 5001
},
"firestore": {
"port": 8080
},
"ui": {
"enabled": true
},
Expand Down
Loading

0 comments on commit 2401670

Please sign in to comment.