Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

README

        

# phospho-ui-react

phospho npm package

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)