-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restructure modules: separate use cases from API #87
Conversation
Tool, | ||
method_tool, | ||
tool, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added all the main public API here (in traditional API sense, not web API) he
# Force "operationId" to be like "django_ai_assistant_delete_thread" | ||
def get_openapi_operation_id(self, operation: Operation) -> str: | ||
name = operation.view_func.__name__ | ||
return (package_name + "_" + name).replace(".", "_") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes us have better names at frontend/src/client/services.gen.ts
Like djangoAiAssistantListAssistants instead of djangoAiAssistantViewsListAssistants
@@ -309,154 +298,3 @@ def as_tool(self, description) -> BaseTool: | |||
def register_assistant(cls: type[AIAssistant]): | |||
ASSISTANT_CLS_REGISTRY[cls.id] = cls | |||
return cls | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to use_cases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small suggestion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, it seems like tests are also failing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Closes #66