Skip to content

DomoAi

DomoAi

User-friendly wrappers for the Domo AI Service Layer routes.

DomoAi

Delegates Domo AI service calls to the ai routes module.

ask_chat async classmethod

ask_chat(
    auth: DomoAuth,
    text_input: str,
    session_id: str | None = None,
    datasource_ids: list[str] | None = None,
    card_ids: list[str] | None = None,
    page_ids: list[str] | None = None,
    return_raw: bool = False,
    session: AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
)

Ask a question via the Domo Basic AI Assistant (streaming).

Source code in src/crew_dcs/classes/DomoAi.py
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
@classmethod
async def ask_chat(
    cls,
    auth: DomoAuth,
    text_input: str,
    session_id: str | None = None,
    datasource_ids: list[str] | None = None,
    card_ids: list[str] | None = None,
    page_ids: list[str] | None = None,
    return_raw: bool = False,
    session: httpx.AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    """Ask a question via the Domo Basic AI Assistant (streaming)."""
    context = RouteContext.build_context(
        context=context,
        session=session,
        debug_api=debug_api,
        debug_num_stacks_to_drop=2,
        parent_class=cls.__name__,
        **context_kwargs,
    )
    return await ai_routes.ask_chat(
        auth=auth,
        text_input=text_input,
        session_id=session_id,
        datasource_ids=datasource_ids,
        card_ids=card_ids,
        page_ids=page_ids,
        return_raw=return_raw,
        context=context,
    )

create_app_with_catalyst async classmethod

create_app_with_catalyst(
    auth: DomoAuth,
    text_input: str,
    session_id: str | None = None,
    datasource_ids: list[str] | None = None,
    card_ids: list[str] | None = None,
    page_ids: list[str] | None = None,
    return_raw: bool = False,
    session: AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
)

Generate a Domo app using App Catalyst (AI assistant streaming).

Source code in src/crew_dcs/classes/DomoAi.py
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
@classmethod
async def create_app_with_catalyst(
    cls,
    auth: DomoAuth,
    text_input: str,
    session_id: str | None = None,
    datasource_ids: list[str] | None = None,
    card_ids: list[str] | None = None,
    page_ids: list[str] | None = None,
    return_raw: bool = False,
    session: httpx.AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    """Generate a Domo app using App Catalyst (AI assistant streaming)."""
    context = RouteContext.build_context(
        context=context,
        session=session,
        debug_api=debug_api,
        debug_num_stacks_to_drop=2,
        parent_class=cls.__name__,
        **context_kwargs,
    )
    return await ai_routes.create_app_with_catalyst(
        auth=auth,
        text_input=text_input,
        session_id=session_id,
        datasource_ids=datasource_ids,
        card_ids=card_ids,
        page_ids=page_ids,
        return_raw=return_raw,
        context=context,
    )

delete_ml_model async classmethod

delete_ml_model(
    auth: DomoAuth,
    model_id: str,
    return_raw: bool = False,
    session: AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
)

Delete an ML model by ID.

Source code in src/crew_dcs/classes/DomoAi.py
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
@classmethod
async def delete_ml_model(
    cls,
    auth: DomoAuth,
    model_id: str,
    return_raw: bool = False,
    session: httpx.AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    """Delete an ML model by ID."""
    context = RouteContext.build_context(
        context=context,
        session=session,
        debug_api=debug_api,
        debug_num_stacks_to_drop=2,
        parent_class=cls.__name__,
        **context_kwargs,
    )
    return await ai_routes.delete_ml_model(
        auth=auth, model_id=model_id, return_raw=return_raw, context=context
    )

delete_ml_project async classmethod

delete_ml_project(
    auth: DomoAuth,
    project_id: str,
    return_raw: bool = False,
    session: AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
)

Delete an ML project by ID.

Source code in src/crew_dcs/classes/DomoAi.py
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
@classmethod
async def delete_ml_project(
    cls,
    auth: DomoAuth,
    project_id: str,
    return_raw: bool = False,
    session: httpx.AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    """Delete an ML project by ID."""
    context = RouteContext.build_context(
        context=context,
        session=session,
        debug_api=debug_api,
        debug_num_stacks_to_drop=2,
        parent_class=cls.__name__,
        **context_kwargs,
    )
    return await ai_routes.delete_ml_project(
        auth=auth, project_id=project_id, return_raw=return_raw, context=context
    )

get_ai_session async classmethod

get_ai_session(
    auth: DomoAuth,
    session_id: str,
    return_raw: bool = False,
    session: AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
)

Retrieve an AI session by ID.

Source code in src/crew_dcs/classes/DomoAi.py
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
@classmethod
async def get_ai_session(
    cls,
    auth: DomoAuth,
    session_id: str,
    return_raw: bool = False,
    session: httpx.AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    """Retrieve an AI session by ID."""
    context = RouteContext.build_context(
        context=context,
        session=session,
        debug_api=debug_api,
        debug_num_stacks_to_drop=2,
        parent_class=cls.__name__,
        **context_kwargs,
    )
    res = await ai_routes.get_ai_session(
        auth=auth, session_id=session_id, return_raw=True, context=context
    )
    if return_raw:
        return res
    return res.response

get_ai_session_context async classmethod

get_ai_session_context(
    auth: DomoAuth,
    session_id: str,
    return_raw: bool = False,
    session: AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
)

Retrieve the context for an AI session.

Source code in src/crew_dcs/classes/DomoAi.py
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
@classmethod
async def get_ai_session_context(
    cls,
    auth: DomoAuth,
    session_id: str,
    return_raw: bool = False,
    session: httpx.AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    """Retrieve the context for an AI session."""
    context = RouteContext.build_context(
        context=context,
        session=session,
        debug_api=debug_api,
        debug_num_stacks_to_drop=2,
        parent_class=cls.__name__,
        **context_kwargs,
    )
    res = await ai_routes.get_ai_session_context(
        auth=auth, session_id=session_id, return_raw=True, context=context
    )
    if return_raw:
        return res
    return res.response

get_ai_settings async classmethod

get_ai_settings(
    auth: DomoAuth,
    return_raw: bool = False,
    session: AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
)

Retrieve the general AI service settings.

Source code in src/crew_dcs/classes/DomoAi.py
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
@classmethod
async def get_ai_settings(
    cls,
    auth: DomoAuth,
    return_raw: bool = False,
    session: httpx.AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    """Retrieve the general AI service settings."""
    context = RouteContext.build_context(
        context=context,
        session=session,
        debug_api=debug_api,
        debug_num_stacks_to_drop=2,
        parent_class=cls.__name__,
        **context_kwargs,
    )
    res = await ai_routes.get_ai_settings(
        auth=auth, return_raw=True, context=context
    )
    if return_raw:
        return res
    return res.response

get_forecasting_default_model async classmethod

get_forecasting_default_model(
    auth: DomoAuth,
    return_raw: bool = False,
    session: AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
)

Get the default forecasting AI model.

Source code in src/crew_dcs/classes/DomoAi.py
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
@classmethod
async def get_forecasting_default_model(
    cls,
    auth: DomoAuth,
    return_raw: bool = False,
    session: httpx.AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    """Get the default forecasting AI model."""
    context = RouteContext.build_context(
        context=context,
        session=session,
        debug_api=debug_api,
        debug_num_stacks_to_drop=2,
        parent_class=cls.__name__,
        **context_kwargs,
    )
    res = await ai_routes.get_forecasting_default_model(
        auth=auth, return_raw=True, context=context
    )
    if return_raw:
        return res
    return res.response

get_forecasting_models async classmethod

get_forecasting_models(
    auth: DomoAuth,
    return_raw: bool = False,
    session: AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
)

List available forecasting AI models.

Source code in src/crew_dcs/classes/DomoAi.py
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
@classmethod
async def get_forecasting_models(
    cls,
    auth: DomoAuth,
    return_raw: bool = False,
    session: httpx.AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    """List available forecasting AI models."""
    context = RouteContext.build_context(
        context=context,
        session=session,
        debug_api=debug_api,
        debug_num_stacks_to_drop=2,
        parent_class=cls.__name__,
        **context_kwargs,
    )
    res = await ai_routes.get_forecasting_models(
        auth=auth, return_raw=True, context=context
    )
    if return_raw:
        return res
    return res.response

get_image_default_model async classmethod

get_image_default_model(
    auth: DomoAuth,
    return_raw: bool = False,
    session: AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
)

Get the default image-to-text AI model.

Source code in src/crew_dcs/classes/DomoAi.py
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
@classmethod
async def get_image_default_model(
    cls,
    auth: DomoAuth,
    return_raw: bool = False,
    session: httpx.AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    """Get the default image-to-text AI model."""
    context = RouteContext.build_context(
        context=context,
        session=session,
        debug_api=debug_api,
        debug_num_stacks_to_drop=2,
        parent_class=cls.__name__,
        **context_kwargs,
    )
    res = await ai_routes.get_image_default_model(
        auth=auth, return_raw=True, context=context
    )
    if return_raw:
        return res
    return res.response

get_image_models async classmethod

get_image_models(
    auth: DomoAuth,
    return_raw: bool = False,
    session: AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
)

List available image-to-text AI models.

Source code in src/crew_dcs/classes/DomoAi.py
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
@classmethod
async def get_image_models(
    cls,
    auth: DomoAuth,
    return_raw: bool = False,
    session: httpx.AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    """List available image-to-text AI models."""
    context = RouteContext.build_context(
        context=context,
        session=session,
        debug_api=debug_api,
        debug_num_stacks_to_drop=2,
        parent_class=cls.__name__,
        **context_kwargs,
    )
    res = await ai_routes.get_image_models(
        auth=auth, return_raw=True, context=context
    )
    if return_raw:
        return res
    return res.response

get_ml_model_by_id async classmethod

get_ml_model_by_id(
    auth: DomoAuth,
    model_id: str,
    return_raw: bool = False,
    session: AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
)

Retrieve an ML model by ID.

Source code in src/crew_dcs/classes/DomoAi.py
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@classmethod
async def get_ml_model_by_id(
    cls,
    auth: DomoAuth,
    model_id: str,
    return_raw: bool = False,
    session: httpx.AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    """Retrieve an ML model by ID."""
    context = RouteContext.build_context(
        context=context,
        session=session,
        debug_api=debug_api,
        debug_num_stacks_to_drop=2,
        parent_class=cls.__name__,
        **context_kwargs,
    )
    res = await ai_routes.get_ml_model_by_id(
        auth=auth, model_id=model_id, return_raw=True, context=context
    )
    if return_raw:
        return res
    return res.response

get_ml_project_by_id async classmethod

get_ml_project_by_id(
    auth: DomoAuth,
    project_id: str,
    return_raw: bool = False,
    session: AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
)

Retrieve an ML project by ID.

Source code in src/crew_dcs/classes/DomoAi.py
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
@classmethod
async def get_ml_project_by_id(
    cls,
    auth: DomoAuth,
    project_id: str,
    return_raw: bool = False,
    session: httpx.AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    """Retrieve an ML project by ID."""
    context = RouteContext.build_context(
        context=context,
        session=session,
        debug_api=debug_api,
        debug_num_stacks_to_drop=2,
        parent_class=cls.__name__,
        **context_kwargs,
    )
    res = await ai_routes.get_ml_project_by_id(
        auth=auth, project_id=project_id, return_raw=True, context=context
    )
    if return_raw:
        return res
    return res.response

run_image_to_text async classmethod

run_image_to_text(
    auth: DomoAuth,
    image_data: str,
    media_type: str = "image/png",
    text_input: str | None = None,
    system_prompt: str | None = None,
    model: str = "domo.domo_ai.domogpt-chat-medium-v1.1:anthropic",
    return_raw: bool = False,
    session: AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
)

Extract text from an image using the Domo AI Image to Text model.

Source code in src/crew_dcs/classes/DomoAi.py
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
@classmethod
async def run_image_to_text(
    cls,
    auth: DomoAuth,
    image_data: str,
    media_type: str = "image/png",
    text_input: str | None = None,
    system_prompt: str | None = None,
    model: str = "domo.domo_ai.domogpt-chat-medium-v1.1:anthropic",
    return_raw: bool = False,
    session: httpx.AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    """Extract text from an image using the Domo AI Image to Text model."""
    context = RouteContext.build_context(
        context=context,
        session=session,
        debug_api=debug_api,
        debug_num_stacks_to_drop=2,
        parent_class=cls.__name__,
        **context_kwargs,
    )
    res = await ai_routes.run_image_to_text(
        auth=auth,
        image_data=image_data,
        media_type=media_type,
        text_input=text_input,
        system_prompt=system_prompt,
        model=model,
        context=context,
    )
    if return_raw:
        return res
    return res.response.get("output")

search_ml_models async classmethod

search_ml_models(
    auth: DomoAuth,
    body: dict | None = None,
    limit: int = 50,
    return_raw: bool = False,
    session: AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
)

List or search ML models.

Source code in src/crew_dcs/classes/DomoAi.py
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
@classmethod
async def search_ml_models(
    cls,
    auth: DomoAuth,
    body: dict | None = None,
    limit: int = 50,
    return_raw: bool = False,
    session: httpx.AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    """List or search ML models."""
    context = RouteContext.build_context(
        context=context,
        session=session,
        debug_api=debug_api,
        debug_num_stacks_to_drop=2,
        parent_class=cls.__name__,
        **context_kwargs,
    )
    res = await ai_routes.search_ml_models(
        auth=auth, body=body, limit=limit, return_raw=True, context=context
    )
    if return_raw:
        return res
    return res.response

search_ml_projects async classmethod

search_ml_projects(
    auth: DomoAuth,
    body: dict | None = None,
    limit: int = 50,
    return_raw: bool = False,
    session: AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
)

List or search ML projects.

Source code in src/crew_dcs/classes/DomoAi.py
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
@classmethod
async def search_ml_projects(
    cls,
    auth: DomoAuth,
    body: dict | None = None,
    limit: int = 50,
    return_raw: bool = False,
    session: httpx.AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    """List or search ML projects."""
    context = RouteContext.build_context(
        context=context,
        session=session,
        debug_api=debug_api,
        debug_num_stacks_to_drop=2,
        parent_class=cls.__name__,
        **context_kwargs,
    )
    res = await ai_routes.search_ml_projects(
        auth=auth, body=body, limit=limit, return_raw=True, context=context
    )
    if return_raw:
        return res
    return res.response

update_ml_model async classmethod

update_ml_model(
    auth: DomoAuth,
    model_id: str,
    body: dict | None = None,
    name: str | None = None,
    description: str | None = None,
    return_raw: bool = False,
    session: AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
)

Update an ML model.

Source code in src/crew_dcs/classes/DomoAi.py
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
@classmethod
async def update_ml_model(
    cls,
    auth: DomoAuth,
    model_id: str,
    body: dict | None = None,
    name: str | None = None,
    description: str | None = None,
    return_raw: bool = False,
    session: httpx.AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    """Update an ML model."""
    context = RouteContext.build_context(
        context=context,
        session=session,
        debug_api=debug_api,
        debug_num_stacks_to_drop=2,
        parent_class=cls.__name__,
        **context_kwargs,
    )
    return await ai_routes.update_ml_model(
        auth=auth,
        model_id=model_id,
        body=body,
        name=name,
        description=description,
        return_raw=return_raw,
        context=context,
    )

update_ml_model_ownership async classmethod

update_ml_model_ownership(
    auth: DomoAuth,
    model_id: str,
    user_id: int,
    return_raw: bool = False,
    session: AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
)

Transfer ownership of an ML model to a different user.

Source code in src/crew_dcs/classes/DomoAi.py
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
@classmethod
async def update_ml_model_ownership(
    cls,
    auth: DomoAuth,
    model_id: str,
    user_id: int,
    return_raw: bool = False,
    session: httpx.AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    """Transfer ownership of an ML model to a different user."""
    context = RouteContext.build_context(
        context=context,
        session=session,
        debug_api=debug_api,
        debug_num_stacks_to_drop=2,
        parent_class=cls.__name__,
        **context_kwargs,
    )
    return await ai_routes.update_ml_model_ownership(
        auth=auth,
        model_id=model_id,
        user_id=user_id,
        return_raw=return_raw,
        context=context,
    )

update_ml_project async classmethod

update_ml_project(
    auth: DomoAuth,
    project_id: str,
    body: dict | None = None,
    name: str | None = None,
    description: str | None = None,
    return_raw: bool = False,
    session: AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
)

Update an ML project.

Source code in src/crew_dcs/classes/DomoAi.py
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
@classmethod
async def update_ml_project(
    cls,
    auth: DomoAuth,
    project_id: str,
    body: dict | None = None,
    name: str | None = None,
    description: str | None = None,
    return_raw: bool = False,
    session: httpx.AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    """Update an ML project."""
    context = RouteContext.build_context(
        context=context,
        session=session,
        debug_api=debug_api,
        debug_num_stacks_to_drop=2,
        parent_class=cls.__name__,
        **context_kwargs,
    )
    return await ai_routes.update_ml_project(
        auth=auth,
        project_id=project_id,
        body=body,
        name=name,
        description=description,
        return_raw=return_raw,
        context=context,
    )

update_ml_project_ownership async classmethod

update_ml_project_ownership(
    auth: DomoAuth,
    project_id: str,
    user_id: int,
    return_raw: bool = False,
    session: AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs
)

Transfer ownership of an ML project to a different user.

Source code in src/crew_dcs/classes/DomoAi.py
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
@classmethod
async def update_ml_project_ownership(
    cls,
    auth: DomoAuth,
    project_id: str,
    user_id: int,
    return_raw: bool = False,
    session: httpx.AsyncClient | None = None,
    debug_api: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
):
    """Transfer ownership of an ML project to a different user."""
    context = RouteContext.build_context(
        context=context,
        session=session,
        debug_api=debug_api,
        debug_num_stacks_to_drop=2,
        parent_class=cls.__name__,
        **context_kwargs,
    )
    return await ai_routes.update_ml_project_ownership(
        auth=auth,
        project_id=project_id,
        user_id=user_id,
        return_raw=return_raw,
        context=context,
    )