Skip to content

Commit

Permalink
chore: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
gtokman committed Oct 18, 2023
1 parent 02d72a1 commit 1e2978b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<div align="center">
<img margin="auto" height="200px" src="https://github.com/candlefinance/react-native-openai/assets/12258850/e951f32f-7e61-4368-b450-0bde33571612" alt="logo / OpenAI">
</div>
https://github.com/candlefinance/react-native-openai/assets/12258850/44a496dc-68bc-44ee-9224-07c302121e94

<br/>

Expand Down Expand Up @@ -54,9 +52,9 @@ yarn add react-native-openai
import OpenAI from 'react-native-openai';

const openAI = new OpenAI('API_KEY', 'ORG_ID');

const [result, setResult] = React.useState('');

// Listen for new messages
React.useEffect(() => {
openAI.chat.addListener('onChatMessageReceived', (payload) => {
setResult((message) => {
Expand All @@ -73,7 +71,7 @@ React.useEffect(() => {
};
}, [openAI]);

// Create a new completion
// Send a message
func ask(question: string) {
openAI.chat.stream({
messages: [
Expand Down

0 comments on commit 1e2978b

Please sign in to comment.