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

org-ai--openai-get-token broken #113

Closed
andreas-roehler opened this issue Jun 9, 2024 · 2 comments
Closed

org-ai--openai-get-token broken #113

andreas-roehler opened this issue Jun 9, 2024 · 2 comments

Comments

@andreas-roehler
Copy link
Contributor

@KaratasFurkan commented on this pull request.

In org-ai-openai.el:

-(defcustom org-ai-openai-api-token nil
+(defcustom org-ai-openai-api-token ""

Hi @andreas-roehler , @rksm , this change breaks the or condition here: https://github.com/andreas-roehler/org-ai/blob/f052119c9f622f1ddb698c08e1ce3bf60b39959f/org-ai-openai.el#L172

The reason is or returns the first non-nil value (e.g. (or nil "" "test") returns ""), which is the empty string in this case.

@andreas-roehler
Copy link
Contributor Author

The empty string evaluates to boolean t in elisp, which seems a little bit odd, but that's how it is. Fix in preparation.

andreas-roehler added a commit to andreas-roehler/org-ai that referenced this issue Jun 9, 2024
Signed-off-by: Andreas Roehler <andreas.roehler@online.de>
rksm added a commit that referenced this issue Jul 1, 2024
#113, org-ai--openai-get-token broken, fixed
@rksm
Copy link
Owner

rksm commented Jul 1, 2024

Thanks for reporting and fixing!

ref #114

@rksm rksm closed this as completed Jul 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