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

not working anymore with Azure OpenAI #9

Closed
behrica opened this issue Jun 3, 2023 · 4 comments
Closed

not working anymore with Azure OpenAI #9

behrica opened this issue Jun 3, 2023 · 4 comments

Comments

@behrica
Copy link
Contributor

behrica commented Jun 3, 2023

The latest version of bosquet does not work with Azure OpenAI any more.
(it did work in the past)

There are various issue with passing "impl", "keys" and so on.

@behrica
Copy link
Contributor Author

behrica commented Jun 3, 2023

I think we need to do some "cleanup" as well.
I would first suggest to remove the get-api-key function:

(defn- get-api-key

net.clojars.wkok/openai-clojure already has 2 documented ways to "setup" the API keys.
Either by setting:
OPENAI_API_KEY or
AZURE_OPENAI_API_KEY

or by passing the API keys in "opts" api/create-completion.

I feel that bosquet should not have any proper code to handle the API keys.

It should just make sure, that both can be used by the user of bosquet:

  1. Regarding usage of environment vars, it should "do nothing", just document it
  2. it should make sure that API keys can be passed inside a template, if the user wants to do so, like this:
(def template
  "
....
{% llm-generate model=text-davinci-003 var-name=play 
   api-key=xxxxx
   }
   ")

@zmedelis
Copy link
Owner

zmedelis commented Jun 9, 2023

This definitely needs fixing. Though I am not sure about adding keys to template. Templates are code, they go to git repo, they are being deployed to different servers with possibly different keys. Secrets do not belong in code.

Just as net.clojars.wkok/openai-clojure relies on env vars to get the keys so does Bosquet can do the same. It is up to the user to make sure that all the keys are exported.

@behrica
Copy link
Contributor Author

behrica commented Jun 12, 2023

"keys in template" is not secure, true.
Thinking about "re-use" of templates,
some other "pieces" should then not be in the template neither.
'model' for example. (this will be different for each user of a template)

This was referenced Jun 16, 2023
@behrica
Copy link
Contributor Author

behrica commented Jun 27, 2023

solved by PR #15

@behrica behrica closed this as completed Jun 27, 2023
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