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 Request - make functions optional #57

Closed
Anto79-ops opened this issue Dec 19, 2023 · 6 comments
Closed

Feature Request - make functions optional #57

Anto79-ops opened this issue Dec 19, 2023 · 6 comments

Comments

@Anto79-ops
Copy link

Anto79-ops commented Dec 19, 2023

Hey!

Would it be possible to make functions optional? For example, some models I use do not support functions and some partially do, and of course OpenAI does support it.

you mentioned this modification to the code that I could use here but then this would also break the OpenAI uses...which works really well, btw.

In the case where the model does not support functions, I would just like to use a the prompt and your integrations acts as a gateway to my localAI instance just acting as a conversation agent (or special prompt) without functions.

thanks

@jekalmin
Copy link
Owner

Thanks again for reporting an issue!

I will look into it in the next release.
I'm quite not sure how to reset functions to default (currently erasing all functions will set it to default).
However, making functions optional is needed as you mentioned.

@Anto79-ops
Copy link
Author

thanks for being so responsive!

Yes, at the moment, blanking the functions text box (actually, I cannot leave it compleletely blank, I usually just put 1 space in the box), does work BUT it throws an core log error on every message it say:

Logger: custom_components.extended_openai_conversation
Source: custom_components/extended_openai_conversation/__init__.py:239
Integration: Extended OpenAI Conversation (documentation)
First occurred: November 26, 2023 at 7:58:41 PM (21 occurrences)
Last logged: 7:27:59 PM

Bad logger message: Failed to load functions ((TypeError("'NoneType' object is not subscriptable"),))

so if it can bypass the functions call when when functions are not needed, would be the best solution.

I'd be happy to try a beta if you wish.

Cheers

jekalmin pushed a commit that referenced this issue Dec 24, 2023
jekalmin pushed a commit that referenced this issue Dec 24, 2023
jekalmin pushed a commit that referenced this issue Dec 24, 2023
@jekalmin
Copy link
Owner

@Anto79-ops
I released this in 0.0.10-beta2.

By setting Functions to [] like below, it will not pass functions parameter to openai
스크린샷 2023-12-24 오후 10 49 41

Please try this and give a feedback :D
Thanks!

@Anto79-ops
Copy link
Author

Anto79-ops commented Dec 24, 2023

@jekalmin, thank you!

Just installed it and gave it a test, and it's working perfectly! No errors.

I can now use models that are not compatible with functions, alongside OpenAI!

:)

@jekalmin
Copy link
Owner

Thanks for a quick repsonse!
I will let you know when it's released in stable version 0.0.10.

@jekalmin
Copy link
Owner

jekalmin commented Jan 1, 2024

Closing the issue.
Feel free to reopen it.

@jekalmin jekalmin closed this as completed Jan 1, 2024
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

No branches or pull requests

2 participants