Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/phospho-app/phospho-ui-react
React components to leverage user feedbacks and phospho logging
https://github.com/phospho-app/phospho-ui-react
Last synced: 3 months ago
JSON representation
React components to leverage user feedbacks and phospho logging
- Host: GitHub
- URL: https://github.com/phospho-app/phospho-ui-react
- Owner: phospho-app
- License: apache-2.0
- Created: 2024-02-13T23:07:51.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-03-29T18:06:24.000Z (10 months ago)
- Last Synced: 2024-10-04T16:39:36.292Z (4 months ago)
- Language: TypeScript
- Size: 853 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# phospho-ui-react
Add a user feedback component to leverage phospho logging
## Usage
1. Register on [phospho.ai](https://phospho.ai) and note down the project id
2. Install the npm package and setup phospho logging in your LLM app```
npm add phospho-ui-react
```4. Use the task_id linked to the log to also attach user feedback.
```javascript
import "./App.css";
import { FeedbackDrawer, Feedback } from "phospho-ui-react";
import "phospho-ui-react/dist/index.css";function App() {
return (
console.log("Submitted: ", feedback)
}
onClose={(feedback: Feedback) => console.log("Closed: ", feedback)}
/>
);
}export default App;
```Under the hood, you can use the `sendUserFeedback` function to register feedbacks to phospho.
Learn more in the [phospho documentation.](https://docs.phospho.ai/guides/user-feedback)