MCPcopy Create free account
hub / github.com/OpenHands/OpenHands / start_conversation

Function start_conversation

scripts/issue_duplicate_check_openhands.py:241–262  ·  view source on GitHub ↗
(
    prompt: str, repository: str, issue_number: int
)

Source from the content-addressed store, hash-verified

239
240
241def start_conversation(
242 prompt: str, repository: str, issue_number: int
243) -> dict[str, Any]:
244 body = {
245 'title': f'Issue duplicate check #{issue_number}',
246 'selected_repository': repository,
247 'initial_message': {
248 'content': [
249 {
250 'type': 'text',
251 'text': prompt,
252 }
253 ]
254 },
255 }
256 return request_json(
257 OPENHANDS_BASE_URL,
258 '/api/v1/app-conversations',
259 method='POST',
260 headers=openhands_headers(),
261 body=body,
262 )
263
264
265def extract_first_item(payload: Any) -> dict[str, Any] | None:

Callers 1

mainFunction · 0.70

Calls 2

request_jsonFunction · 0.70
openhands_headersFunction · 0.70

Tested by

no test coverage detected