Spaces:
Running
Running
tweaks
Browse files- app.R +6 -2
- system-prompt.md +1 -2
app.R
CHANGED
@@ -147,8 +147,7 @@ server <- function(input, output, session) {
|
|
147 |
observeEvent(input$user_msg, {
|
148 |
stream <- chat$chat(input$chat)
|
149 |
|
150 |
-
|
151 |
-
# Reset wiht chat$set_turns(NULL)
|
152 |
|
153 |
# Parse response
|
154 |
response <- jsonlite::fromJSON(stream)
|
@@ -177,6 +176,11 @@ server <- function(input, output, session) {
|
|
177 |
|
178 |
# We need to somehow trigger this df to update the map.
|
179 |
data$df <- df
|
|
|
|
|
|
|
|
|
|
|
180 |
} else {
|
181 |
output$agent <- renderText(response$agent)
|
182 |
|
|
|
147 |
observeEvent(input$user_msg, {
|
148 |
stream <- chat$chat(input$chat)
|
149 |
|
150 |
+
|
|
|
151 |
|
152 |
# Parse response
|
153 |
response <- jsonlite::fromJSON(stream)
|
|
|
176 |
|
177 |
# We need to somehow trigger this df to update the map.
|
178 |
data$df <- df
|
179 |
+
|
180 |
+
# Note: ellmer will preserve full chat history automatically.
|
181 |
+
# this can confuse the agent and mess up behavior, so we reset:
|
182 |
+
chat$set_turns(NULL)
|
183 |
+
|
184 |
} else {
|
185 |
output$agent <- renderText(response$agent)
|
186 |
|
system-prompt.md
CHANGED
@@ -28,7 +28,6 @@ in that county or state.
|
|
28 |
Refer to this descriptions of each of the columns (VARIABLE_NAME) from the metadata table:
|
29 |
<schema>
|
30 |
|
31 |
-
|
32 |
-
column as well because county names are not unique across states!
|
33 |
|
34 |
|
|
|
28 |
Refer to this descriptions of each of the columns (VARIABLE_NAME) from the metadata table:
|
29 |
<schema>
|
30 |
|
31 |
+
Whenenver you SELECT the COUNTY, you must include the STCNTY column as well because county names are not unique across states!
|
|
|
32 |
|
33 |
|