Generate Adoption Profile - AI Integration
The Generate Adoption Profile action available on an Animal
record in AnimalOS uses an integration with OpenAI to generate the Adoption Profile
for the Animal
. Upon clicking the action a request is sent to OpenAI with structured data from the Animal
record, it’s processed through ChatGPT and a response is captured in the Adoption Profile
field on the Animal
which provides a nicely written adoption profile.
Configuration - OpenAI
AnimalOS requires an OpenAI API Key
for this integration to work. To Login or Sign Up to an OpenAI account go to the link below.
When logged in, you can generate an API Key
by following these steps:
Click the Cog Icon in the top right to open Settings.
Got to Project > API Keys.
Complete the verification steps if needed.
Click on Create new secret key.
A Payment Method
will also be required to activate the API Keys for use.
Go to Organization > Billing to add a
Payment Method
.
Configuration - AnimalOS
In the AnimalOS Settings page you will see a tab for AI Settings
where you can add your OpenAI API Key
.
Endpoint
will be https://api.openai.com/v1/Language Model
defines the chat processor that is used (eg. gpt-4)Temperature
controls the randomness of the generated output. Higher values (e.g., 0.8) produce more creative but potentially less coherent responses, while lower values (e.g., 0.2) generate more focused and deterministic responses.Max Tokens
is used to limit the length of the generated response by specifying the maximum number of tokens. This helps control the output length and can prevent excessively long responses. Costs are also generated based on number of tokens used.
Generate Adoption Profile Flow
A Salesforce Flow is configured with the necessary information and uses the AnimalOS Generate Content
apex class to send the request to OpenAI, this flow is triggered when a user clicks the Generate Adoption Profile action on an Animal
record.
Output Field
defines where the response from ChatGPT will be captured.Record ID
provides the context of theAnimal
record where the request is sent.Request
provides the text that is sent in the request.Source Fields
defines the field values that are sent with the request to describe theAnimal
.
Additional flows can be configured to support similar data flows where you would like to send a request to ChatGPT and receive a response in a targeted field.
Generate Adoption Profile Quick Action
On an Animal
record you’ll find the Generate Adoption Profile quick action. Clicking this will trigger the flow and send a request to ChatGPT for an Adoption Profile.
Go to the Adoption
tab on the Animal
to review the updated Adoption Profile
.