Skip to content
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

Review #73

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Review #73

wants to merge 1 commit into from

Conversation

xster
Copy link

@xster xster commented Nov 2, 2024

Not a real PR. This is just the only way I can think of of being able to comment on every file

Copy link
Author

@xster xster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, gtg for the day. Only read the readme so far


- multi-turn chat (remembering context along the way)
- streaming responses
- multi-line chat text input (via Alt/Opt+Enter on web/desktop)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ultra-nit: shift-enter seems like a more widespread convention except in excel/sheets. WDYT?

- streaming responses
- multi-line chat text input (via Alt/Opt+Enter on web/desktop)
- cancel in-progress request
- edit the last prompt (starting with long-press as the UI gesture)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

- multi-media attachments ([the web currently doesn't like file attachments](https://github.com/csells/flutter_ai_toolkit/issues/18), so they're disabled)
- handling structured LLM responses
- app-provided prompt suggestions
- pre-processing prompts to add prompt engineering, etc.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't read the code yet. But maybe you're saying the API accepts programmatic system prompts right? "prompt engineering is too vague"

- handling structured LLM responses
- app-provided prompt suggestions
- pre-processing prompts to add prompt engineering, etc.
- pre-processing requests to enrich the output, e.g. host Flutter widgets
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't read the code, but didn't understand what this means

1. model string, which you can ready about in [the Gemini models docs](https://ai.google.dev/gemini-api/docs/models/gemini), and
1. an API key, which you can get [in Gemini AI Studio](https://aistudio.google.com/app/apikey).

With this in place, you're ready to write the Gemini code shown above. If you like, you can plug your API key and model string into the <a href="https://github.com/csells/flutter_ai_toolkit/blob/main/example/lib/gemini/gemini.dart">gemini.dart</a> sample. This sample has been tested on Android, iOS, the web and macOS, so give it a whirl.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like you want people to make a lib/gemini_api_key.dart file, but you didn't say so here. Maybe just ask users to input the key in the app and save to shared_preferences instead of not compiling?

body: LlmChatView(
provider: GeminiProvider(
model: 'gemini-1.5-flash',
apiKey: googleApiKey,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apiKey: // Paste your own API key here

@csells
Copy link
Owner

csells commented Nov 2, 2024

this is a super clever way to provide feedback. thank you @xster !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants