can i set a Prompt for the api requests?
Yeah, you can! Here’s a quick example using the Python SDK:
from perplexity import Perplexity
client = Perplexity()
completion = client.chat.completions.create(
model="sonar-pro",
messages=[
{
"role": "user",
"content": "What are the major AI developments and announcements from today across the tech industry?"
}
]
)
print(completion.choices[0].message.content)
You can read more at https://docs.perplexity.ai/getting-started/quickstart