ListView

This module contains views to implement the React.

LLMHost list view in the Smarter Dashboard.

class smarter.apps.llmhost.views.listview.view.LLMHostComputeListView(**kwargs)[source]

Bases: SmarterAuthenticatedNeverCachedWebView

Render the LLMHostCompute list view for the Smarter Workbench web console.

It displays the LLMHostComputes available to the authenticated user: the kinds of node, and node groups, that their LLMHosts can run on.

Returns:

Rendered HTML page, in which the React app @smarter/llmhost-compute-list renders the list.

Return type:

HttpResponse

computes: list[LLMHostCompute]
property formatted_class_name: str

Returns a formatted string of the class name for logging purposes.

get(request, *args, **kwargs)[source]

Handle GET requests and return a cleaned HttpResponse.

Parameters:

request (ASGIRequest) – The HTTP request object.

Returns:

An HttpResponse with the cleaned HTML content.

Return type:

HttpResponse

template_path: str = 'react/llmhost-compute-list.html'
class smarter.apps.llmhost.views.listview.view.LLMHostListView(**kwargs)[source]

Bases: SmarterAuthenticatedNeverCachedWebView

Render the llmhost list view for the Smarter Workbench web console.

This view displays all llmhosts available to the authenticated user as cards, providing a quick overview and access to llmhost details.

Parameters:
  • request (ASGIRequest) – Django HTTP request object.

  • args (tuple) – Additional positional arguments.

  • kwargs (dict) – Additional keyword arguments.

Returns:

Rendered HTML page with a card for each llmhost, or a 404 error page if the user is not authenticated.

Return type:

HttpResponse

property formatted_class_name: str

Returns a formatted string of the class name for logging purposes.

get(request, *args, **kwargs)[source]

Handle GET requests and return a cleaned HttpResponse.

Parameters:

request (ASGIRequest) – The HTTP request object.

Returns:

An HttpResponse with the cleaned HTML content.

Return type:

HttpResponse

llmhosts: list[LLMHost]
template_path: str = 'react/llmhost-list.html'