Loading...
Loading...
Compare original and translation side by side
| Topic | When to Use | Reference |
|---|---|---|
| Answer API | Q&A with citations, grounded responses | answer-api.md |
| Deep Search | Smart query expansion, high-quality summaries | deep-search.md |
| Citations | Source attribution, verification | citations.md |
| 主题 | 适用场景 | 参考文档 |
|---|---|---|
| Answer API | 带引用的问答、有依据的回复 | answer-api.md |
| 深度搜索 | 智能查询扩展、高质量摘要 | deep-search.md |
| 引用 | 来源归因、验证 | citations.md |
from exa_py import Exa
exa = Exa()
response = exa.answer(
"What are the key features of Python 3.12?",
text=True
)
print(response.answer)
for citation in response.citations:
print(f"Source: {citation.url}")from exa_py import Exa
exa = Exa()
response = exa.answer(
"What are the key features of Python 3.12?",
text=True
)
print(response.answer)
for citation in response.citations:
print(f"Source: {citation.url}")stream = exa.answer(
"Explain the benefits of microservices architecture",
stream=True
)
for chunk in stream:
print(chunk.text, end="", flush=True)stream = exa.answer(
"Explain the benefits of microservices architecture",
stream=True
)
for chunk in stream:
print(chunk.text, end="", flush=True)undefinedundefinedresults = exa.search_and_contents(
"latest developments in quantum computing",
type="neural",
num_results=10,
summary=True,
use_autoprompt=True # Smart query expansion
)
for result in results.results:
print(f"{result.title}")
print(f"Summary: {result.summary}")results = exa.search_and_contents(
"latest developments in quantum computing",
type="neural",
num_results=10,
summary=True,
use_autoprompt=True # Smart query expansion
)
for result in results.results:
print(f"{result.title}")
print(f"Summary: {result.summary}")| Feature | Use Case | Output |
|---|---|---|
| Answer API | Direct Q&A needing citations | Answer + source URLs |
| Deep Search | Query expansion + summaries | Enhanced search results |
| Exa Research | Long-form async reports | Structured JSON/Markdown |
| 功能 | 使用案例 | 输出结果 |
|---|---|---|
| Answer API | 需要引用的直接问答 | 答案 + 来源URL |
| 深度搜索 | 查询扩展 + 摘要 | 增强版搜索结果 |
| Exa Research | 长文本异步报告 | 结构化JSON/Markdown |
stream=Trueresponse.citationstext=Truetext=Truecitation.urlstream=Trueresponse.citationstext=Truetext=Truecitation.url