0.1.3 • Published 6 months ago
az-genai-convo v0.1.3
Azure OpenAI Gen AI View
This is a Gen AI conversation module that works on Azure's Open AI configuration and models
Steps to install
Using npm: $ npm install az-genai-convo.
Using yarn: $ yarn install az-genai-convo.
Use React Native link for version < 0.72 for manual linking. React Native version > 0.72 allows automatic linking.
Open terminal or Cmd prompt in your iOS project and type pod install to install all the dependencies.
How to use?
In your function component,
import {Conversation} from 'az-genai-convo';
.
.
const MyComponent = () => {
return (
<View style={{flex: 1}}> // optional
<Conversation
url="https://your open ai model end point" // required
apiKey="your api key" // required
horizontalPadding={10} // optional
verticalPadding={10} // optional
/>
</View>
);
}
export default MyComponent;
Troubleshooting tips.
- Wrap the library component in tag and provide style={{flex: 1}} only if the component does not span the entire screen vertically.
- Wrap the library component in tag and provide style={{padding: 10}} or style={{margin: 10}} if you do not want to set the vertical and horizontal padding of the library component (Caution: Check for Text Input hiding behind the keyboard).