<SociableAiChat /> Component
Usage
Here is the example from the installation section:
Properties
Required Properties:
apiKey
(string): Your API key for authentication.baseUrl
(string): The base URL of your AI backend service (app.sociable.how).chatName
(string): The name displayed at the top of the chat interface.personaName
(string): The name of the AI persona in the chat.greetingMessage
(string): The initial message displayed from the AI persona.
Optional Properties:
appearance
(SociableAiChatStyleProps): An object to customize the appearance of the chat interface.
API Integration
The SociableAiChat component handles API calls to our backend automatically.
For more detailed information on API integration, please refer to our API documentation here.
Best Practices
- Always keep your API key secure and never expose it in client-side code.
- Use environment variables to manage your
apiKey
andbaseUrl
.
Customizing Appearance
You can customize the appearance of the chat interface using the appearance
prop. Here’s an example:
Note that you can import the SociableAiChatStyleProps
type to ensure you’re passing the correct object structure. There are many more configurable fields available than what is shown in this example. Your code editor’s IntelliSense will show you all the available properties you can customize.
This change adds the new appearance
property to the documentation, provides an example of its usage, and informs users about the SociableAiChatStyleProps
type and the availability of additional configurable fields.