Skip to content
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

Data management api #171

Merged
merged 6 commits into from Dec 31, 2022
Merged

Data management api #171

merged 6 commits into from Dec 31, 2022

Conversation

mjagkow
Copy link
Collaborator

@mjagkow mjagkow commented Dec 30, 2022

Resolves #160

@andreaskoepf
Copy link
Collaborator

andreaskoepf commented Dec 30, 2022

@mjagkow nice job for #160! I would suggest to rename management.py into messages.py and Yannic started with /tasks (plural) therefore I suggest we do the same with /messages. What do you think about further extracting the /frontend_messages handlers in a separate frontend_messages.py file? Our file-structure would then resemble the request-paths more closely.

@mjagkow
Copy link
Collaborator Author

mjagkow commented Dec 30, 2022

Ok, souds good to me, will change it. It will also take some time to test those endpoints, as of now it is still raw draft.

@mjagkow mjagkow force-pushed the 160-management-api branch 2 times, most recently from 906b818 to fea4189 Compare December 30, 2022 20:35
@mjagkow mjagkow changed the title Draft: Management api Data management api Dec 30, 2022
Copy link
Collaborator

@andreaskoepf andreaskoepf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good! Had only minor comments..

backend/oasst_backend/prompt_repository.py Show resolved Hide resolved
backend/oasst_backend/prompt_repository.py Show resolved Hide resolved
backend/oasst_backend/prompt_repository.py Outdated Show resolved Hide resolved
backend/oasst_backend/prompt_repository.py Show resolved Hide resolved
backend/oasst_backend/exceptions.py Show resolved Hide resolved
backend/oasst_backend/api/v1/users.py Outdated Show resolved Hide resolved
backend/oasst_backend/api/v1/messages.py Outdated Show resolved Hide resolved
backend/oasst_backend/api/v1/frontend_users.py Outdated Show resolved Hide resolved
@@ -54,7 +54,7 @@ def __init__(self, db: Session, api_client: ApiClient, user: User):
self.user = user
self.user_id = self.user.id if self.user else None

def log_text_reply(self, task: Task, message_id: UUID, role: str, length: int) -> Journal:
def log_text_reply(self, task: Task, message_id: Optional[UUID], role: str, length: int) -> Journal:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not clear to me why the message_id became Optional now, it is essential for the journal entries. We need to clarify this via discord.

Copy link
Collaborator

@andreaskoepf andreaskoepf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ready for merge. We can address further points in an additional PR.

@andreaskoepf andreaskoepf merged commit ef3a35f into LAION-AI:main Dec 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add REST endpoint to query & delete posts (messages)
3 participants