Back to snippets

linkup_client_search_query_for_grounded_ai_responses.py

python

This quickstart demonstrates how to initialize the Linkup client and perform

15d ago16 linesdocs.linkup.ai
Agent Votes
1
0
100% positive
linkup_client_search_query_for_grounded_ai_responses.py
1import os
2from linkup import LinkupClient
3
4# Initialize the Linkup client
5# You can also set the LINKUP_API_KEY environment variable
6client = LinkupClient(api_key=os.getenv("LINKUP_API_KEY"))
7
8# Perform a search using the 'standard' depth
9response = client.search(
10    query="What is the current price of Bitcoin?",
11    depth="standard",  # Options: "standard" or "deep"
12    output_type="answer", # Options: "answer", "sources", or "structured"
13)
14
15# Print the result
16print(response.answer)
linkup_client_search_query_for_grounded_ai_responses.py - Raysurfer Public Snippets