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

FastAPI Framework Setup Modification #9

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

XXXJumpingFrogXXX
Copy link

Set up FastAPI and Refactor Project Structure

This PR includes the following changes:

  1. Created a new main.py file: Established basic FastAPI settings to enhance application structure and scalability. This setup includes initial configurations and middleware setup, laying the groundwork for future development.
  2. Renamed the original main.py: Changed to original_main.py to preserve the previous version and provide a reference for legacy code, facilitating a smooth transition and ensuring no loss of important historical context.
  3. Refactored project structure: Maintained the existing piggy directory and introduced a chat directory. This separation of routers and APIs improves modularity, making it easier to manage and extend each project independently.

These changes aim to improve code organization and prepare the project for scalable development with FastAPI.

@chimosky
Copy link
Member

This looks like a duplicate of #7, if there's anything that's new here you can just push it there and close this, or close that one in favour of this as there's no need for two PRs by the same author addressing the same issue.

@chimosky
Copy link
Member

@XXXJumpingFrogXXX you're yet to respond to any of my comments in this PR or #7.

@XXXJumpingFrogXXX
Copy link
Author

@XXXJumpingFrogXXX you're yet to respond to any of my comments in this PR or #7.

I have given a response to that

@chimosky
Copy link
Member

Your opening comment should be part of your commit messages because git stores that, and that's what we care about.

@XXXJumpingFrogXXX
Copy link
Author

Your opening comment should be part of your commit messages because git stores that, and that's what we care about.

I will pay special attention to this in future commits and make sure my commit messages are more detailed and clear. Thank you for the reminder!

@chimosky
Copy link
Member

You should also edit your current commit messages to include the details, git commit --amend would edit the latest commit or you can use interactive rebase if you want to edit other commit messages like the one before it.

(1) Created the latest main.py file and completed some basic FastAPI settings in it.
(2) Renamed the original main.py file to original_main.py.
(3) Kept the existing piggy directory and created a chat directory to establish separate routers and APIs for each project.
(1)Created a new main.py file: Established basic FastAPI settings to enhance application structure and scalability. This setup includes initial configurations and middleware setup, laying the groundwork for future development.
(2)Renamed the original main.py: Changed to original_main.py to preserve the previous version and provide a reference for legacy code, facilitating a smooth transition and ensuring no loss of important historical context.
(3)Refactored project structure: Maintained the existing piggy directory and introduced a chat directory. This separation of routers and APIs improves modularity, making it easier to manage and extend each project independently.
These changes aim to improve code organization and prepare the project for scalable development with FastAPI.
@XXXJumpingFrogXXX
Copy link
Author

I have updated the commit messages for the recent two PRs.

router = APIRouter()

@router.post("/generate_answer")
def generate_answer(value: Question):
Copy link
Member

Choose a reason for hiding this comment

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

This looks like an extended version of generate_bot_response in original_main.py below, if that's the case then you should delete that one as it was based on your draft PR to chat activity.

Also, does the prompt you've used here provide better responses than the one you used earlier?

Copy link
Author

Choose a reason for hiding this comment

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

This looks like an extended version of generate_bot_response in original_main.py below, if that's the case then you should delete that one as it was based on your draft PR to chat activity.

Also, does the prompt you've used here provide better responses than the one you used earlier?

For the first question: This is not an extended version of generate_bot_response from original_main.py. This version utilizes the Unsloth library within Chat Activity and is significantly different from original_main.py. Additionally, we plan to remove the original_main.py file in the final modifications.

For the second question: Yes, the new prompt encourages the model to generate better responses.

Copy link
Member

Choose a reason for hiding this comment

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

For the first question: This is not an extended version of generate_bot_response from original_main.py. This version utilizes the Unsloth library within Chat Activity and is significantly different from original_main.py. Additionally, we plan to remove the original_main.py file in the final modifications.

Yes it's significantly different from original_main.py, but it's achieving the same goal as that so generate_bot_response from original_main.py needs to be deleted to avoid duplicity.

Copy link
Author

Choose a reason for hiding this comment

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

For the first question: This is not an extended version of generate_bot_response from original_main.py. This version utilizes the Unsloth library within Chat Activity and is significantly different from original_main.py. Additionally, we plan to remove the original_main.py file in the final modifications.

Yes it's significantly different from original_main.py, but it's achieving the same goal as that so generate_bot_response from original_main.py needs to be deleted to avoid duplicity.

Oh, I agree! I will delete that!

Copy link
Member

Choose a reason for hiding this comment

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

Thank you! Can you also start working on Kshitij's part? I think you can work with what he has so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants