-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[Feat] AI Assistant [2] #2777
Open
lixun910
wants to merge
22
commits into
master
Choose a base branch
from
xli-ai-assist-2
base: master
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.
+2,641
−3,106
Open
[Feat] AI Assistant [2] #2777
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
18a3902
assistant: add geojson layer
lixun910 847392d
assistant: add geojson layer cont
lixun910 67d3a9a
add filter assistant
lixun910 721428a
update filter function
lixun910 eb2174d
Create a geojson layer using price_pp with custom color scale [10, 20…
lixun910 9d6c797
add custom scale
lixun910 9cec606
allow custom colors; add built-in histogram
lixun910 aa205c3
screen capture webgl canvas without drawing buffer
lixun910 9d608f7
allow to add dataset metadata context; try to fix netlify build
lixun910 5c255f4
fix conflict
lixun910 82385ed
resolve conflict
lixun910 a38624e
Fix lint
lixun910 78c2f86
fix netlify build-1
lixun910 369247c
try fix netlify 2
lixun910 90ee874
fix netlify build 3
lixun910 a874fe7
try fix netlify 4
lixun910 4202fc7
try fix netlify build 5
lixun910 445969d
try netlify build 6
lixun910 fdd40bb
address comments; add multistep assistant
lixun910 da5399d
adress comments; remove duplicated action call
lixun910 b025f8d
make logic cleaner; remove unnecessary "add dataset context"
lixun910 97e0d88
fix for both openai and gemini
lixun910 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,6 +64,7 @@ | |
}, | ||
"packageManager": "[email protected]", | ||
"devDependencies": { | ||
"esbuild-plugin-replace": "^1.4.0" | ||
"esbuild-plugin-replace": "^1.4.0", | ||
"redux-logger": "^3.0.6" | ||
} | ||
} |
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
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 |
---|---|---|
@@ -1,14 +1,29 @@ | ||
// SPDX-License-Identifier: MIT | ||
// Copyright contributors to the kepler.gl project | ||
|
||
export const TASK_LIST = '1. Change the basemap style.\n2. Load data from url.'; | ||
export const TASK_LIST = | ||
'1. Change the basemap style.\n2. Load data from url.\n3. Create a map layer using variable.\n4. Filter the data of a variable.\n5. Create a histogram.'; | ||
|
||
export const WELCOME_MESSAGE = `Hi, I am Kepler.gl AI Assistant!\nHere are some tasks I can help you with:\n\n${TASK_LIST}`; | ||
|
||
export const INSTRUCTIONS = `You are a helpful assistant that can answer questions and help with tasks. If you can use tools, please use them. If the parameters of functions are not provided, please ask user to specify them. Otherwise, just answer the question with plain textdirectly. Do not include any programming code in your response. You can do the following tasks: ${TASK_LIST}`; | ||
export const INSTRUCTIONS = `You are a Kepler.gl AI Assistant that can answer questions and help with tasks of mapping and spatial data analysis. | ||
|
||
When responding to user queries: | ||
1. Analyze if the task requires one or multiple function calls | ||
2. For each required function: | ||
- Identify the appropriate function to call | ||
- Determine all required parameters | ||
- If parameters are missing, ask the user to provide them | ||
- Execute functions in a sequential order | ||
|
||
You can execute multiple functions to complete complex tasks, but execute them one at a time in a logical sequence. Always validate the success of each function call before proceeding to the next one. | ||
|
||
Remember to: | ||
- Return function calls in a structured format that can be parsed and executed | ||
- Wait for confirmation of each function's completion before proceeding | ||
- Prompt user to proceed to the next function if needed | ||
- Provide clear feedback about what action is being taken | ||
- Do not include raw programming code in responses to users`; | ||
|
||
export const ASSISTANT_NAME = 'kepler-gl-ai-assistant'; | ||
|
||
export const ASSISTANT_DESCRIPTION = 'A Kepler.gl AI Assistant'; | ||
|
||
export const ASSISTANT_VERSION = '0.0.1-1'; | ||
export const ASSISTANT_VERSION = '0.0.1-9'; |
Oops, something went wrong.
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.
Could be a separate PR?