-
Notifications
You must be signed in to change notification settings - Fork 68
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
Error: 1st argument is not an atom #89
Comments
I am not familiar with the response for {:parameterized, Ecto.Embedded, %Ecto.Embedded{related: related}} but as can be seen in the error message above, what we're getting is {:parameterized, {Ecto.Embedded, %Ecto.Embedded{related: related}}} I am not in a position to verify this now but I suspect that there may have been a change in what Ecto returns? |
I am getting the same, I managed to create a workaround using normal schemas
|
Hi there, First and foremost, I am new to Elixir so please excuse any stupidity. I am also getting this error when running the Politician example. I tried changing to a "normal" schema: defmodule Politician do
use Ecto.Schema
use Instructor.Validator
schema "politician" do
field :first_name, :string
field :last_name, :string
has_many :offices_held, Politician.Office
end
end
defmodule Politician.Office do
use Ecto.Schema
use Instructor.Validator
schema "office" do
field :office, Ecto.Enum, values: [:president, :vice_president, :governor, :consgress, :senate]
field :from_date, :date
field :to_date, :date
end
end Then running: Instructor.chat_completion(
model: "gpt-3.5-turbo",
response_model: Politician,
messages: [
%{
role: "user",
content:
"Who won the American 2020 election and what offices have they held over their career?"
}
]
) Returns:
|
I can confirm this is fixed on the main branch:
I suppose this is linked to Issues #25 - however, this fix does bring up issue #88
|
Can confirm this has been fixed on main for me 👍🏻 |
Solved in the latest release, {:instructor, "~> 0.1.0"} |
I'm running into this error still unfortunately:
My dependency versions are:
Any help would be much appreciated!
The text was updated successfully, but these errors were encountered: