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

feature: make path-pattern mapping dynamic and scalable #52

Conversation

dheerapat
Copy link
Contributor

Currently your back-end API have only one, static path for external_wisdom pattern which is too rigid and hard to scale. As mentioned in #44

I added a new way to dynamically map each path to each pattern and easy to scale further.

This is not a breaking change, It still compatible with the original code, you will be able to run the same HTTP call without error. But now you will have more flexibility on the back-end side.

server/openai.key Outdated Show resolved Hide resolved
@danielmiessler
Copy link
Owner

This has conflicts, unfortunately, and I'm not sure I'm fully grasping the idea. Can you restate?

@dheerapat
Copy link
Contributor Author

This has conflicts, unfortunately, and I'm not sure I'm fully grasping the idea. Can you restate?

example: currently when I go to localhost:5000/extwis I can send a post request to tell the server to mill my input with your pattern and then send to OpanAI to get the answer

I proposed that instead you building @app.route("/extwis", methods=["POST"]) for every pattern, we can just make path /<pattern> dynamic by adding a mapping dictionary to map path with the pattern user want to use. more info on this

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.

None yet

2 participants