Open wuhanjun opened 2 days ago
Hey, the registerCompletion
function and copilot.complete
handle errors internally by logging them with appropriate messages and ignoring them. Both functions will not throw errors. However, if you prefer to handle the errors yourself, I can create a new option called throwOnError
for both functions. This option would prevent logging and ignoring the errors, and instead, throw them. What do you think?
Which headers do you need to customize from frontend? Is it in the request going from the frontend to the API where you set up copilot.complete
, or in the request going to the AI model?
Because I only used the front-end part of the monacopilot, the back-end part was implemented by our company's server-side colleagues themselves, without using Node.
When used in my project, we will add some custom attributes required by the business itself in the request header. In addition, we also need to notice the user with an error message when the interface encounters an error, or redirect to a single sign on site when not logged in.
I understand.
Already on it, Keep you posted!
Hey, here's an update: please update monacopilot to the latest version (v0.10.19 🚀).
Refer to the following:
I believe these will fulfill your needs. Lmk if not 🙂
If you have any questions or need further assistance, feel free to reach out. I'm happy to help! Thanks!
So efficient, thank you very much. I'll give it a try.
Speaking of which, would it be better to open up a request API? It will return a promise. If someone else wants to customize the processing of request parameters, or handle the results of responses, etc., you will need to add other methods or properties. Haha, I want to hear your opinion.
Hello, How can I customize headers, catch errors, etc. when I only need to access the front-end part?