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

[Obs AI Assistant] It should be possible to clear the user-specific system prompt #202279

Merged
merged 4 commits into from
Dec 2, 2024

Conversation

sorenlouv
Copy link
Member

@sorenlouv sorenlouv commented Nov 29, 2024

I noticed that I was not able to clear the user-specific system prompt. I had initially entered "Please speak in Swedish" and saved. Afterwards I wanted to clear this but the save button is disabled if the text content is empty.

image

@sorenlouv sorenlouv requested a review from a team as a code owner November 29, 2024 11:32
@botelastic botelastic bot added ci:project-deploy-observability Create an Observability project Team:Obs AI Assistant Observability AI Assistant labels Nov 29, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ai-assistant (Team:Obs AI Assistant)

Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@sorenlouv sorenlouv added v7.17.0 release_note:fix backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) labels Nov 29, 2024
@@ -405,7 +405,7 @@ export class KnowledgeBaseService {
document: {
'@timestamp': new Date().toISOString(),
...doc,
semantic_text: doc.text,
...(doc.text ? { semantic_text: doc.text } : {}),
Copy link
Member Author

@sorenlouv sorenlouv Dec 2, 2024

Choose a reason for hiding this comment

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

Empty semantic_text is not allowed so the field is removed when empty

@elasticmachine
Copy link
Contributor

elasticmachine commented Dec 2, 2024

💚 Build Succeeded

  • Buildkite Build
  • Commit: f3b31bd
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-202279-f3b31bdf94ca

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
observabilityAiAssistantManagement 97.7KB 97.7KB -29.0B

History

Copy link
Contributor

@viduni94 viduni94 left a comment

Choose a reason for hiding this comment

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

LGTM

@sorenlouv sorenlouv merged commit a63441d into main Dec 2, 2024
9 checks passed
@sorenlouv sorenlouv deleted the enable-save-empty-content branch December 2, 2024 13:34
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 7.17, 8.15, 8.16, 8.17, 8.x

https://github.com/elastic/kibana/actions/runs/12120465072

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 2, 2024
…ystem prompt (elastic#202279)

I noticed that I was not able to clear the user-specific system prompt.
I had initially entered "Please speak in Swedish" and saved. Afterwards
I wanted to clear this but the save button is disabled if the text
content is empty.

![image](https://github.com/user-attachments/assets/c3889831-e96a-491f-a8c1-29ae235af2ae)

(cherry picked from commit a63441d)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 2, 2024
…ystem prompt (elastic#202279)

I noticed that I was not able to clear the user-specific system prompt.
I had initially entered "Please speak in Swedish" and saved. Afterwards
I wanted to clear this but the save button is disabled if the text
content is empty.

![image](https://github.com/user-attachments/assets/c3889831-e96a-491f-a8c1-29ae235af2ae)

(cherry picked from commit a63441d)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
7.17 Backport failed because of merge conflicts
8.15 Backport failed because of merge conflicts
8.16 Backport failed because of merge conflicts
8.17
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Manual backport

To create the backport manually run:

node scripts/backport --pr 202279

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Dec 2, 2024
…ific system prompt (#202279) (#202469)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Obs AI Assistant] It should be possible to clear the user-specific
system prompt (#202279)](#202279)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Søren
Louv-Jansen","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-02T13:33:59Z","message":"[Obs
AI Assistant] It should be possible to clear the user-specific system
prompt (#202279)\n\nI noticed that I was not able to clear the
user-specific system prompt.\r\nI had initially entered \"Please speak
in Swedish\" and saved. Afterwards\r\nI wanted to clear this but the
save button is disabled if the text\r\ncontent is
empty.\r\n\r\n![image](https://github.com/user-attachments/assets/c3889831-e96a-491f-a8c1-29ae235af2ae)","sha":"a63441d461d32130c25c6d21d2b42c18eb2f14b5","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","v7.17.0","backport:prev-minor","Team:Obs
AI Assistant","ci:project-deploy-observability"],"title":"[Obs AI
Assistant] It should be possible to clear the user-specific system
prompt","number":202279,"url":"https://github.com/elastic/kibana/pull/202279","mergeCommit":{"message":"[Obs
AI Assistant] It should be possible to clear the user-specific system
prompt (#202279)\n\nI noticed that I was not able to clear the
user-specific system prompt.\r\nI had initially entered \"Please speak
in Swedish\" and saved. Afterwards\r\nI wanted to clear this but the
save button is disabled if the text\r\ncontent is
empty.\r\n\r\n![image](https://github.com/user-attachments/assets/c3889831-e96a-491f-a8c1-29ae235af2ae)","sha":"a63441d461d32130c25c6d21d2b42c18eb2f14b5"}},"sourceBranch":"main","suggestedTargetBranches":["7.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202279","number":202279,"mergeCommit":{"message":"[Obs
AI Assistant] It should be possible to clear the user-specific system
prompt (#202279)\n\nI noticed that I was not able to clear the
user-specific system prompt.\r\nI had initially entered \"Please speak
in Swedish\" and saved. Afterwards\r\nI wanted to clear this but the
save button is disabled if the text\r\ncontent is
empty.\r\n\r\n![image](https://github.com/user-attachments/assets/c3889831-e96a-491f-a8c1-29ae235af2ae)","sha":"a63441d461d32130c25c6d21d2b42c18eb2f14b5"}},{"branch":"7.17","label":"v7.17.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Søren Louv-Jansen <[email protected]>
kibanamachine added a commit that referenced this pull request Dec 2, 2024
…cific system prompt (#202279) (#202468)

# Backport

This will backport the following commits from `main` to `8.17`:
- [[Obs AI Assistant] It should be possible to clear the user-specific
system prompt (#202279)](#202279)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Søren
Louv-Jansen","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-02T13:33:59Z","message":"[Obs
AI Assistant] It should be possible to clear the user-specific system
prompt (#202279)\n\nI noticed that I was not able to clear the
user-specific system prompt.\r\nI had initially entered \"Please speak
in Swedish\" and saved. Afterwards\r\nI wanted to clear this but the
save button is disabled if the text\r\ncontent is
empty.\r\n\r\n![image](https://github.com/user-attachments/assets/c3889831-e96a-491f-a8c1-29ae235af2ae)","sha":"a63441d461d32130c25c6d21d2b42c18eb2f14b5","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","v7.17.0","backport:prev-minor","Team:Obs
AI Assistant","ci:project-deploy-observability"],"title":"[Obs AI
Assistant] It should be possible to clear the user-specific system
prompt","number":202279,"url":"https://github.com/elastic/kibana/pull/202279","mergeCommit":{"message":"[Obs
AI Assistant] It should be possible to clear the user-specific system
prompt (#202279)\n\nI noticed that I was not able to clear the
user-specific system prompt.\r\nI had initially entered \"Please speak
in Swedish\" and saved. Afterwards\r\nI wanted to clear this but the
save button is disabled if the text\r\ncontent is
empty.\r\n\r\n![image](https://github.com/user-attachments/assets/c3889831-e96a-491f-a8c1-29ae235af2ae)","sha":"a63441d461d32130c25c6d21d2b42c18eb2f14b5"}},"sourceBranch":"main","suggestedTargetBranches":["7.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202279","number":202279,"mergeCommit":{"message":"[Obs
AI Assistant] It should be possible to clear the user-specific system
prompt (#202279)\n\nI noticed that I was not able to clear the
user-specific system prompt.\r\nI had initially entered \"Please speak
in Swedish\" and saved. Afterwards\r\nI wanted to clear this but the
save button is disabled if the text\r\ncontent is
empty.\r\n\r\n![image](https://github.com/user-attachments/assets/c3889831-e96a-491f-a8c1-29ae235af2ae)","sha":"a63441d461d32130c25c6d21d2b42c18eb2f14b5"}},{"branch":"7.17","label":"v7.17.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Søren Louv-Jansen <[email protected]>
@sorenlouv sorenlouv removed the backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) label Dec 3, 2024
@sorenlouv sorenlouv added the backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) label Dec 3, 2024
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 7.17, 8.15, 8.16, 8.17, 8.x

https://github.com/elastic/kibana/actions/runs/12137259528

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
7.17 Backport failed because of merge conflicts
8.15 Backport failed because of merge conflicts
8.16 Backport failed because of merge conflicts
8.17 Cherrypick failed because the selected commit (a63441d) is empty. It looks like the commit was already backported in #202468
8.x Cherrypick failed because the selected commit (a63441d) is empty. It looks like the commit was already backported in #202469

Manual backport

To create the backport manually run:

node scripts/backport --pr 202279

Questions ?

Please refer to the Backport tool documentation

@sorenlouv sorenlouv added v8.17.0 backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) and removed v8.17.0 v7.17.0 backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) labels Dec 3, 2024
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.17, 8.x

https://github.com/elastic/kibana/actions/runs/12137819295

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.17 Cherrypick failed because the selected commit (a63441d) is empty. It looks like the commit was already backported in #202468
8.x Cherrypick failed because the selected commit (a63441d) is empty. It looks like the commit was already backported in #202469

Manual backport

To create the backport manually run:

node scripts/backport --pr 202279

Questions ?

Please refer to the Backport tool documentation

CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 9, 2024
…ystem prompt (elastic#202279)

I noticed that I was not able to clear the user-specific system prompt.
I had initially entered "Please speak in Swedish" and saved. Afterwards
I wanted to clear this but the save button is disabled if the text
content is empty.

![image](https://github.com/user-attachments/assets/c3889831-e96a-491f-a8c1-29ae235af2ae)
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 12, 2024
…ystem prompt (elastic#202279)

I noticed that I was not able to clear the user-specific system prompt.
I had initially entered "Please speak in Swedish" and saved. Afterwards
I wanted to clear this but the save button is disabled if the text
content is empty.

![image](https://github.com/user-attachments/assets/c3889831-e96a-491f-a8c1-29ae235af2ae)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) ci:project-deploy-observability Create an Observability project release_note:fix Team:Obs AI Assistant Observability AI Assistant v8.17.0 v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants