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

authToken doesn't work in version 1.4 #109

Open
matanstau opened this issue Aug 2, 2023 · 6 comments
Open

authToken doesn't work in version 1.4 #109

matanstau opened this issue Aug 2, 2023 · 6 comments

Comments

@matanstau
Copy link

let openAI = OpenAISwift(authToken: "TOKEN") doesn't work anymore in version 1.4

@Mmanion
Copy link

Mmanion commented Aug 2, 2023

I believe you may be referring to #102

@matanstau
Copy link
Author

Thanks that solved that.
I'm still getting some issues with version 1.4
The same code that use to work is now returning "The operation couldn’t be completed. (OpenAISwift.OpenAIError error 2.)"

@danielreiman
Copy link

Me to, Have you solved it by now ?

@matanstau
Copy link
Author

Not really

@marcoboerner
Copy link

I think there is an undocumented change, to initialize it you have to use: let openAI = OpenAISwift(config: .makeDefaultOpenAI(apiKey: "TOKEN"))

@laszlotuss
Copy link

laszlotuss commented Aug 19, 2023

These are two separate issues, which I both fixed and made a Pull Request #114

  • Fixed auth issue due to ChatMessage Codable & Identifiable yet OpenAI does reject authorisation due to additional properties are not allowed
  • Restored old init but flagged as deprecated to don't break compatibility

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

5 participants