-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Gemini Ai Support #446
Open
aakash-a-dev
wants to merge
5
commits into
srcbookdev:main
Choose a base branch
from
aakash-a-dev:gemini-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
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 @@ | ||
ALTER TABLE `config` ADD `gemini_api_key` text; |
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,276 @@ | ||
{ | ||
"version": "6", | ||
"dialect": "sqlite", | ||
"id": "c148b92f-4dbc-4a31-887d-dfaebd4db615", | ||
"prevId": "0acbefdc-659a-48ad-a4c1-a44ebca56c08", | ||
"tables": { | ||
"apps": { | ||
"name": "apps", | ||
"columns": { | ||
"id": { | ||
"name": "id", | ||
"type": "integer", | ||
"primaryKey": true, | ||
"notNull": true, | ||
"autoincrement": false | ||
}, | ||
"name": { | ||
"name": "name", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false | ||
}, | ||
"external_id": { | ||
"name": "external_id", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false | ||
}, | ||
"history": { | ||
"name": "history", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false, | ||
"default": "'[]'" | ||
}, | ||
"history_version": { | ||
"name": "history_version", | ||
"type": "integer", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false, | ||
"default": 1 | ||
}, | ||
"created_at": { | ||
"name": "created_at", | ||
"type": "integer", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false, | ||
"default": "(unixepoch())" | ||
}, | ||
"updated_at": { | ||
"name": "updated_at", | ||
"type": "integer", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false, | ||
"default": "(unixepoch())" | ||
} | ||
}, | ||
"indexes": { | ||
"apps_external_id_unique": { | ||
"name": "apps_external_id_unique", | ||
"columns": [ | ||
"external_id" | ||
], | ||
"isUnique": true | ||
} | ||
}, | ||
"foreignKeys": {}, | ||
"compositePrimaryKeys": {}, | ||
"uniqueConstraints": {} | ||
}, | ||
"config": { | ||
"name": "config", | ||
"columns": { | ||
"base_dir": { | ||
"name": "base_dir", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false | ||
}, | ||
"default_language": { | ||
"name": "default_language", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false, | ||
"default": "'typescript'" | ||
}, | ||
"openai_api_key": { | ||
"name": "openai_api_key", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false | ||
}, | ||
"anthropic_api_key": { | ||
"name": "anthropic_api_key", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false | ||
}, | ||
"xai_api_key": { | ||
"name": "xai_api_key", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false | ||
}, | ||
"gemini_api_key": { | ||
"name": "gemini_api_key", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false | ||
}, | ||
"enabled_analytics": { | ||
"name": "enabled_analytics", | ||
"type": "integer", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false, | ||
"default": true | ||
}, | ||
"srcbook_installation_id": { | ||
"name": "srcbook_installation_id", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false, | ||
"default": "'gid1al6p9ibob8tb6qmmuokg94'" | ||
}, | ||
"ai_provider": { | ||
"name": "ai_provider", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false, | ||
"default": "'openai'" | ||
}, | ||
"ai_model": { | ||
"name": "ai_model", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false, | ||
"default": "'gpt-4o'" | ||
}, | ||
"ai_base_url": { | ||
"name": "ai_base_url", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false | ||
}, | ||
"subscription_email": { | ||
"name": "subscription_email", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"autoincrement": false | ||
} | ||
}, | ||
"indexes": {}, | ||
"foreignKeys": {}, | ||
"compositePrimaryKeys": {}, | ||
"uniqueConstraints": {} | ||
}, | ||
"secrets": { | ||
"name": "secrets", | ||
"columns": { | ||
"id": { | ||
"name": "id", | ||
"type": "integer", | ||
"primaryKey": true, | ||
"notNull": true, | ||
"autoincrement": false | ||
}, | ||
"name": { | ||
"name": "name", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false | ||
}, | ||
"value": { | ||
"name": "value", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false | ||
} | ||
}, | ||
"indexes": { | ||
"secrets_name_unique": { | ||
"name": "secrets_name_unique", | ||
"columns": [ | ||
"name" | ||
], | ||
"isUnique": true | ||
} | ||
}, | ||
"foreignKeys": {}, | ||
"compositePrimaryKeys": {}, | ||
"uniqueConstraints": {} | ||
}, | ||
"secrets_to_sessions": { | ||
"name": "secrets_to_sessions", | ||
"columns": { | ||
"id": { | ||
"name": "id", | ||
"type": "integer", | ||
"primaryKey": true, | ||
"notNull": true, | ||
"autoincrement": false | ||
}, | ||
"session_id": { | ||
"name": "session_id", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false | ||
}, | ||
"secret_id": { | ||
"name": "secret_id", | ||
"type": "integer", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false | ||
} | ||
}, | ||
"indexes": { | ||
"secrets_to_sessions_session_id_secret_id_unique": { | ||
"name": "secrets_to_sessions_session_id_secret_id_unique", | ||
"columns": [ | ||
"session_id", | ||
"secret_id" | ||
], | ||
"isUnique": true | ||
} | ||
}, | ||
"foreignKeys": { | ||
"secrets_to_sessions_secret_id_secrets_id_fk": { | ||
"name": "secrets_to_sessions_secret_id_secrets_id_fk", | ||
"tableFrom": "secrets_to_sessions", | ||
"tableTo": "secrets", | ||
"columnsFrom": [ | ||
"secret_id" | ||
], | ||
"columnsTo": [ | ||
"id" | ||
], | ||
"onDelete": "no action", | ||
"onUpdate": "no action" | ||
} | ||
}, | ||
"compositePrimaryKeys": {}, | ||
"uniqueConstraints": {} | ||
} | ||
}, | ||
"enums": {}, | ||
"_meta": { | ||
"schemas": {}, | ||
"tables": {}, | ||
"columns": {} | ||
}, | ||
"internal": { | ||
"indexes": {} | ||
} | ||
} |
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
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
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
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a big deal but why change this order?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, we can ignore this during the integration I was getting a type error which I thought could be resolved by having ai-sdk for Google installed in the root package when I later realized it has nothing to with it, I removed it from package.json for avoiding not so necessary installation in the package. And honestly I didn't realized that it changed the order.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need this particular commit as well btw! I don't know how it got committed because I remembered I removed the dependency, if it's possible to not align with the following package.json then it works because we have nothing to do with root's package.json file