Skip to content

Commit c136cae

Browse files
committed
initial commit
1 parent 0875724 commit c136cae

File tree

209 files changed

+13248
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

209 files changed

+13248
-0
lines changed

Diff for: .gitignore

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
migrate_working_dir/
12+
13+
# IntelliJ related
14+
*.iml
15+
*.ipr
16+
*.iws
17+
.idea/
18+
19+
# The .vscode folder contains launch configuration and tasks you configure in
20+
# VS Code which you may wish to be included in version control, so this line
21+
# is commented out by default.
22+
#.vscode/
23+
24+
# Flutter/Dart/Pub related
25+
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
26+
/pubspec.lock
27+
**/doc/api/
28+
.dart_tool/
29+
build/
30+
example/.env
31+
example/lib/firebase_options.dart
32+
example/firebase.json
33+
example/.firebaserc
34+
example/android/app/google-services.json
35+
example/ios/Runner/GoogleService-Info.plist
36+
example/macos/Runner/GoogleService-Info.plist
37+
example/lib/echo.dart
38+
.flutter-plugins
39+
.flutter-plugins-dependencies
40+
.vscode/settings.json

Diff for: .metadata

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled and should not be manually edited.
5+
6+
version:
7+
revision: "761747bfc538b5af34aa0d3fac380f1bc331ec49"
8+
channel: "stable"
9+
10+
project_type: package

Diff for: .vscode/launch.json

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "main",
6+
"cwd": "example",
7+
"request": "launch",
8+
"type": "dart",
9+
"program": "lib/main.dart",
10+
},
11+
{
12+
"name": "gemini",
13+
"cwd": "example",
14+
"request": "launch",
15+
"type": "dart",
16+
"program": "lib/gemini/gemini.dart",
17+
},
18+
{
19+
"name": "vertex",
20+
"cwd": "example",
21+
"request": "launch",
22+
"type": "dart",
23+
"program": "lib/vertex/vertex.dart",
24+
},
25+
{
26+
"name": "demo",
27+
"cwd": "example",
28+
"request": "launch",
29+
"type": "dart",
30+
"program": "lib/demo/demo.dart",
31+
},
32+
{
33+
"name": "welcome",
34+
"cwd": "example",
35+
"request": "launch",
36+
"type": "dart",
37+
"program": "lib/welcome/welcome.dart",
38+
},
39+
{
40+
"name": "cupertino",
41+
"cwd": "example",
42+
"request": "launch",
43+
"type": "dart",
44+
"program": "lib/cupertino/cupertino.dart",
45+
},
46+
{
47+
"name": "custom styles",
48+
"cwd": "example",
49+
"request": "launch",
50+
"type": "dart",
51+
"program": "lib/custom_styles/custom_styles.dart",
52+
},
53+
{
54+
"name": "dark mode",
55+
"cwd": "example",
56+
"request": "launch",
57+
"type": "dart",
58+
"program": "lib/dark_mode/dark_mode.dart",
59+
},
60+
{
61+
"name": "history",
62+
"cwd": "example",
63+
"request": "launch",
64+
"type": "dart",
65+
"program": "lib/history/history.dart",
66+
},
67+
{
68+
"name": "suggestions",
69+
"cwd": "example",
70+
"request": "launch",
71+
"type": "dart",
72+
"program": "lib/suggestions/suggestions.dart",
73+
},
74+
{
75+
"name": "logging",
76+
"cwd": "example",
77+
"request": "launch",
78+
"type": "dart",
79+
"program": "lib/logging/logging.dart",
80+
},
81+
{
82+
"name": "recipes",
83+
"cwd": "example",
84+
"request": "launch",
85+
"type": "dart",
86+
"program": "lib/recipes/recipes.dart",
87+
},
88+
]
89+
}

Diff for: CHANGELOG.md

+162
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
## 0.6.5
2+
3+
* implemented [#12](https://github.com/csells/flutter_ai_toolkit/issues/12): would like some hover icons for copy+edit on web and desktop
4+
5+
* implemented [#9](https://github.com/csells/flutter_ai_toolkit/issues/9): need to be able to cancel a prompt edit and get back the last response unharmed
6+
7+
## 0.6.4
8+
9+
* fixed [#62](https://github.com/csells/flutter_ai_toolkit/issues/62): bug: getting an image back from the LLM that doesn't exist throws an exception
10+
11+
* expanded the `messageSender` docs on `LlmChatView` to make it clear what it's for and when it's used
12+
13+
* renamed FatXxx to ToolkitXxx e.g. FatColors => ToolkitColors
14+
15+
* fixed [#77](https://github.com/csells/flutter_ai_toolkit/issues/77): move dark theming to the samples and out of the toolkit, since it has no designer input
16+
17+
## 0.6.3
18+
19+
* fixed [#55](https://github.com/csells/flutter_ai_toolkit/issues/55): TextField overflow error for large inputs
20+
21+
* fixed [#39](https://github.com/csells/flutter_ai_toolkit/issues/39): bug: notify developer of invalid API key on the web
22+
23+
* fixed [#18](https://github.com/csells/flutter_ai_toolkit/issues/18): Gemini or Vertex + the web + a file attachment == hang
24+
25+
## 0.6.2
26+
27+
* minor API and README updates based on review feedback
28+
29+
## 0.6.1
30+
31+
* implemented [#16](https://github.com/csells/flutter_ai_toolkit/issues/16): feature: ensure pressing the camera button on desktop web brings up the camera
32+
33+
## 0.6.0
34+
35+
* simplifying the `LlmProvider` interface for implementors
36+
37+
## 0.5.0
38+
39+
* fixed [#67](https://github.com/csells/flutter_ai_toolkit/issues/67): bug: audio recording translation repopulated after history cleared
40+
41+
* fixed [#68](https://github.com/csells/flutter_ai_toolkit/issues/68): bug: need suggestion styling
42+
43+
* implemented [#72](https://github.com/csells/flutter_ai_toolkit/issues/72): feature: move welcome message to the LlmChatView
44+
45+
* updated recipes sample to use required properties in the JSON schema, which improved LLM responses a great deal
46+
47+
* implemented [#74](https://github.com/csells/flutter_ai_toolkit/issues/74): remove controllers as an unnecessary abstraction
48+
49+
* fixed an issue where canceling an operation w/ no response yet will continue showing the progress indicator.
50+
51+
52+
## 0.4.2
53+
54+
* upgraded to waveform_recorder 1.3.0
55+
56+
* fix [#69](https://github.com/csells/flutter_ai_toolkit/issues/69): SDK dependency conflict by lowering sdk requirement to 3.4.0
57+
58+
## 0.4.1
59+
60+
* updated samples, demo and README
61+
62+
## 0.4.0
63+
64+
* implemented [#13](https://github.com/csells/flutter_ai_toolkit/issues/13): UI needs dark mode support
65+
66+
* implemented [#30](https://github.com/csells/flutter_ai_toolkit/issues/30): chat serialization/deserialization
67+
68+
* fixed [#64](https://github.com/csells/flutter_ai_toolkit/issues/64): bug: selection sticks around after clearing the history
69+
70+
* fixed [#63](https://github.com/csells/flutter_ai_toolkit/issues/63): bug: broke multi-line text input
71+
72+
* fixed [#60](https://github.com/csells/flutter_ai_toolkit/issues/60): bug: if an LLM request fails with no text in the response, the progress indicator never stops
73+
74+
* implemented [#31](https://github.com/csells/flutter_ai_toolkit/issues/31): feature: provide a list of initial suggested prompts to display in an empty chat session
75+
76+
* implemented [#25](https://github.com/csells/flutter_ai_toolkit/issues/25): better mobile long-press action menu for chat messages
77+
78+
* fixed [#47](https://github.com/csells/flutter_ai_toolkit/issues/25): bug: Long pressing a message and then clicking outside of the toolbar should make the toolbar disappear
79+
80+
## 0.3.0
81+
82+
* implemented [#32](https://github.com/csells/flutter_ai_toolkit/issues/32): feature: dev-configured LLM message icon
83+
84+
* fixed [#19](https://github.com/csells/flutter_ai_toolkit/issues/19): prompt attachments are incorrectly merging when editing after adding attachments to a new prompt
85+
86+
* implemented [#27](https://github.com/csells/flutter_ai_toolkit/issues/27): feature: styling of colors and fonts
87+
88+
## 0.2.1
89+
90+
* fixing the user message edit menu
91+
92+
* show errors and cancelations as separate from message output; this is necessary so that you can tell the difference between an LLM message response with a successful result that, for example, can be parsed as JSON, or an error
93+
94+
## 0.2.0
95+
96+
* implemented [#33](https://github.com/csells/flutter_ai_toolkit/issues/33): feature: chat microphone only prompt input
97+
98+
* added a `generateStream` method to `LlmProvider` to support talking to the underlying generative model w/o adding to the chat history; moved `chatModel` properties in the Gemini and Vertex providers to use a more generic `generativeModel` to make it clear which model is being used for both `sendMessageStream` and `generateStream`.
99+
100+
* moved from [flutter_markdown_selectionarea](https://pub.dev/packages/flutter_markdown_selectionarea) to plain ol' [flutter_markdown](https://pub.dev/packages/flutter_markdown) which does now support selection if you ask it nicely. I still have some work to do on selection, however, as described in [issue #12](https://github.com/csells/flutter_ai_toolkit/issues/12).
101+
102+
* implemented [#27](https://github.com/csells/flutter_ai_toolkit/issues/27): styling support, including a sample
103+
104+
* fixed [#3](https://github.com/csells/flutter_ai_toolkit/issues/3): ensure Google Font Roboto is being resolved
105+
106+
* implemented [#2](https://github.com/csells/flutter_ai_toolkit/issues/2): feature: enable full functionality inside a Cupertino app
107+
108+
* fixed [#45](https://github.com/csells/flutter_ai_toolkit/issues/45): bug: X icon button is also pushing up against the top and left edges without any padding
109+
110+
* fixed [#59](https://github.com/csells/flutter_ai_toolkit/issues/59): bug: Android Studio LadyBug Upgrade Issues
111+
112+
* upgraded to the GA version of firebase_vertexai
113+
114+
## 0.1.6
115+
116+
* added optional `welcomeMessage` to `LlmChatView` and a welcome sample. thanks, @berkaykurkcu!
117+
118+
* updated VertexProvider to take a separate chat and embedding model like GeminiProvider
119+
120+
* fixed #51 : Click on an image to get a preview. thanks, @Shashwat-111!
121+
122+
* fixed #6: get a spark icon to designate the LLM
123+
124+
* updated README for clarity
125+
126+
## 0.1.5
127+
128+
* Reference docs update
129+
130+
## 0.1.4
131+
132+
* CHANGELOG fix
133+
134+
## 0.1.3
135+
136+
* new real-world-ish sample: recipes
137+
138+
* new custom LLM provider sample: gemma
139+
140+
* handling structured LLM responses via `responseBuilder` (see recipes sample)
141+
142+
* app-provided prompt suggestions (see recipes sample)
143+
144+
* pre-processing prompts to add prompt engineering via `messageSender`
145+
146+
* pre-processing requests to enrich the output, e.g. host Flutter widgets (see recipes sample)
147+
148+
* swappable support for LLM providers; oob support for Gemini and Vertex (see gemma example)
149+
150+
* fixed trim and over-eager message editing issues -- thanks, @Shashwat-111!
151+
152+
## 0.1.2
153+
154+
* More README fixups
155+
156+
## 0.1.1
157+
158+
* Fixing README screenshot (sigh)
159+
160+
## 0.1.0
161+
162+
* Initial alpha release

Diff for: LICENSE

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Copyright 2024, the Flutter AI Toolkit project authors. All rights reserved.
2+
Redistribution and use in source and binary forms, with or without
3+
modification, are permitted provided that the following conditions are
4+
met:
5+
6+
* Redistributions of source code must retain the above copyright
7+
notice, this list of conditions and the following disclaimer.
8+
* Redistributions in binary form must reproduce the above
9+
copyright notice, this list of conditions and the following
10+
disclaimer in the documentation and/or other materials provided
11+
with the distribution.
12+
* Neither the name of Google Inc. nor the names of its
13+
contributors may be used to endorse or promote products derived
14+
from this software without specific prior written permission.
15+
16+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 commit comments

Comments
 (0)