You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/integrations/streamlit.md
+11-14Lines changed: 11 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,23 +96,20 @@ if st.session_state.logged_prompt:
96
96
97
97
What's going on here? Let's break down this snippet:
98
98
99
-
1.`collector = FeedbackCollector()` allows you to authenticate with Trubrics
99
+
### 1. `FeedbackCollector()`
100
100
101
-
!!!tip
102
-
The authentication token is cached already, but to optimise your app further, wrap the `FeedbackCollector` in [@st.cache_data](https://docs.streamlit.io/library/api-reference/performance/st.cache_data).
101
+
!!!tip
102
+
The authentication token is cached already, but to optimise your app further, wrap the `FeedbackCollector` in [@st.cache_data](https://docs.streamlit.io/library/api-reference/performance/st.cache_data).
Each feedback component holds a unique type of feedback. You should create multiple `FeedbackCollector` for collecting different types of feedback in the same app.
Copy file name to clipboardExpand all lines: docs/platform/user_prompts.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,10 @@ prompt = trubrics.log_prompt(
40
40
!!!note "`trubrics.log_prompt()` arguments"
41
41
:::trubrics.Trubrics.log_prompt
42
42
43
+
### Saving prompts from Streamlit apps
44
+
45
+
The `FeedbackCollector` Streamlit integration inherits from the `Trubrics` object, meaning that you can log prompts in the same way directly from the `FeedbackCollector`. For more information on this, see the [Streamlit integration](../integrations/streamlit.md) docs.
46
+
43
47
## Analyse prompts in Trubrics
44
48
45
49
Various filters allow AI teams to explore user prompts in Trubrics, and export them to csv.
0 commit comments