Documentation Index
Fetch the complete documentation index at: https://docs.salad.com/llms.txt
Use this file to discover all available pages before exploring further.
Last Updated: March 28, 2025
By using our integrated custom LLM prompts, you can automatically follow a Sales Playbook from your transcribed meetings
and sales calls to help meet your KPIs. To use this, you just need to add the custom_prompt input parameter to your
transcription request.
In this example, we’ll use a Python script to transcribe an audio file and tell it to use the custom_prompt input
parameter to answer questions in our mock playbook. We’ll use the following input parameters:
payload = {"input": {
"custom_prompt": "The following is a sales call transcription. Follow the playbook and answer the questions. If there are no answers, say 'No answer'. Question 1: Did the sales person get the customers name? Question 2: Did the sales person correctly understand the customers requirements? Question 3: Did the sales person ask for the customer's pain point with their existing providor? Question 4: How well and precisely did the sales person answer questions posed by the customer? Question 5: Did the sales person ask the customer how the call went?",
"url": audio_file_url,
"diarization": True,
"language_code": "en",
"return_as_file": False
}}
Python script
We’re going to create a file and name it playbook.py. We’re then going to use the above parameters in the following
Python script:
import requests
import time
audio_file_url = "https://your-storage.com/path/to/audio.mp3" # replace with your audio file URL
salad_api_key = "YOUR_SALAD_API_KEY" # replace with your Salad API key
organization_name = "YOUR_ORGANIZATION_NAME" # replace with your organization name
payload = {"input": {
"custom_prompt": "The following is a sales call transcription. Follow the playbook and answer the questions. If there are no answers, say 'No answer'. Question 1: Did the sales person get the customers name? Question 2: Did the sales person correctly understand the customers requirements? Question 3: Did the sales person ask for the customer's pain point with their existing provider? Question 4: How well and precisely did the sales person answer questions posed by the customer? Question 5: Did the sales person ask the customer how the call went?",
"url": audio_file_url,
"diarization": True,
"language_code": "en",
"return_as_file": False
}}
headers = {
"Salad-Api-Key": salad_api_key,
"Content-Type": "application/json"
}
url = f"https://api.salad.com/api/public/organizations/{organization_name}/inference-endpoints/transcribe/jobs"
response = requests.post(url, json=payload, headers=headers)
response = response.json()
job_id=response["id"]
print (f'Job ID: {job_id}')
while True:
time.sleep(5)
try:
result = requests.get(f"{url}/{job_id}", headers=headers)
result = result.json()
if result["status"] == "created" or result["status"] == "pending" or result["status"] == "started" or result["status"] == "running":
print(f'Current job status is {result["status"]}')
elif result["status"] == "failed":
print(f'Job failed')
break
elif result["output"]:
print(result["output"]["llm_result"])
break
else:
print(f'Current job status is {result["status"]}')
except Exception as e:
print(f'Error retrieving transcription result: {e}')
break
- Make sure to replace
https://your-storage.com/path/to/audio.mp3 with the URL of your audio file.
- Replace
YOUR_SALAD_API_KEY with
your Salad API key.
- Replace
YOUR_ORGANIZATION_NAME with your organization name.
- Modify the questions in the
custom_prompt parameter to match your playbook.
- Run the script using
python playbook.py.
In this script, we’re telling the LLM to answer our questions and fill in the sales playbook. It will be returned in the
llm_result field of the response. We’re then printing the result of this field to the console. Your console will look
something like this once it finishes:
Output
Job ID: abcdef6c-1234-41e8-b81b-ecc1109033ed
Current job status is running
Current job status is running
Current job status is running
Current job status is running
Current job status is running
Current job status is running
Current job status is running
Current job status is running
Current job status is running
Transcription Result: Question 1: Did the sales person get the customer's name?
Yes.
Question 2: Did the sales person correctly understand the customer's requirements?
Yes.
Question 3: Did the sales person ask for the customer's pain point with their existing provider?
No.
Question 4: How well and precisely did the sales person answer questions posed by the customer?
Good, provided relevant information about NVIDIA 50 series controversy.
Question 5: Did the sales person ask the customer how the call went?
No.