You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Synchronous API calls currently have a **1 minute timeout**. For complex questions that might take longer to process, request [asynchronous processing](#asynchronous-processing) instead.
43
-
</Callout>
41
+
All Deep Search conversations are processed asynchronously. When you create a conversation, the API will return immediately with a conversation object containing the question in `processing` status.
44
42
45
43
Create a new Deep Search conversation by asking a question:
-d '{"question":"Does github.com/sourcegraph/sourcegraph have a README?"}'
54
52
```
55
53
56
-
The API returns a complete conversation object including the generated answer:
54
+
The API returns a conversation object with the question initially in `processing` status:
57
55
58
56
```json
59
57
{
60
-
"id": 332,
61
-
"questions": [
62
-
{
63
-
"id": 4978,
64
-
"conversation_id": 332,
65
-
"question": "Does github.com/sourcegraph/sourcegraph have a README?",
66
-
"status": "completed",
67
-
"title": "Check for README in sourcegraph/sourcegraph",
68
-
"answer": "Yes, [github.com/sourcegraph/sourcegraph](/github.com/sourcegraph/sourcegraph/) has a [README.md](/github.com/sourcegraph/sourcegraph/-/blob/README.md) file in the root directory.",
69
-
"sources": [
70
-
{
71
-
"type": "Repository",
72
-
"link": "/github.com/sourcegraph/sourcegraph",
73
-
"label": "github.com/sourcegraph/sourcegraph"
74
-
}
75
-
],
76
-
"suggested_followups": [
77
-
"What is the purpose of the README.md file in the sourcegraph repository?"
-d '{"question":"Analyze the authentication patterns across all our microservices"}'
102
+
-H 'X-Requested-With: my-client 1.0.0'
101
103
```
102
104
103
-
This returns a `202 Accepted` status with the conversation object showing a `processing` status. You can then poll the conversation endpoint to check for completion:
105
+
Once processing is complete, the response will include the answer:
"question": "Does github.com/sourcegraph/sourcegraph have a README?",
115
+
"created_at": "2025-09-24T08:14:06Z",
116
+
"updated_at": "2025-09-24T08:14:15Z",
117
+
"status": "completed",
118
+
"title": "GitHub README check",
119
+
"answer": "Yes, [github.com/sourcegraph/sourcegraph](https://sourcegraph.test:3443/github.com/sourcegraph/sourcegraph) has a [README.md](https://sourcegraph.test:3443/github.com/sourcegraph/sourcegraph/-/blob/README.md) file in the root directory.",
120
+
"sources": [
121
+
{
122
+
"type": "Repository",
123
+
"link": "/github.com/sourcegraph/sourcegraph",
124
+
"label": "github.com/sourcegraph/sourcegraph"
125
+
}
126
+
],
127
+
"stats": {
128
+
"time_millis": 6369,
129
+
"tool_calls": 1,
130
+
"total_input_tokens": 13632,
131
+
"cached_tokens": 12359,
132
+
"cache_creation_input_tokens": 13625,
133
+
"prompt_tokens": 11,
134
+
"completion_tokens": 156,
135
+
"total_tokens": 13694,
136
+
"credits": 2
137
+
},
138
+
"suggested_followups": [
139
+
"What information does the README.md file contain?",
140
+
"Are there other important documentation files in the repository?"
0 commit comments