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

Cannot find 'Chat' in scope #192

Open
ppoh71 opened this issue Apr 2, 2024 · 6 comments
Open

Cannot find 'Chat' in scope #192

ppoh71 opened this issue Apr 2, 2024 · 6 comments

Comments

@ppoh71
Copy link

ppoh71 commented Apr 2, 2024

Describe the bug
In the latest Version 0.2.7 the public struct Chat is missing ?!

public struct Chat: Codable, Equatable { ... }

Compiler errors: Cannot find 'Chat' in the scope
The struct is not in the ChatQuery.swift file, where it was in 0.2.6
Is that new or a change? Couldn't find anything in the docs.

To Reproduce
Install 0.2.7 and try to use something like this
let messages = [Chat(role: Chat.Role.system, content: instructions)]

Expected behavior
'Chat' struct in the scope

Desktop (please complete the following information):
Version 0.2.7

@alexsereno
Copy link

Yea I ran into this too, its on us for relying on the demo code although it probably could have been comm'd.

See compare to resolve.

@subtlepath
Copy link

Was this intentional or a mistake? It’s irregular to break a public API with a point release. Wondering whether to pin at 0.2.6 for now or if these changes are going to stick around.

@subtlepath
Copy link

@kalafus ^

@lieudd
Copy link

lieudd commented Apr 9, 2024

ChatQuery

It changes to ChatQuery.ChatCompletionMessageParam

@StefanBristol
Copy link

:-(

@StefanBristol
Copy link

So how would I go about changing all the code in my app to use ChatQuery.ChatCompletionMessageParam instead of Chat.
I don't suppose a typealias will do!
Any help gratefully received as I'm stuck using 0.2.6 and would love to upgrade and contribute

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