langfun
langfun copied to clipboard
Scoring implementation
Hi, thanks for the cool project!
I'm trying to run the examples here: https://github.com/google/langfun/blob/2ae17d3da30d54633fc93620e0316d7c08673aaa/langfun/core/structured/scoring.py#L43C1-L44C1 But the scoring functionality doesn't seem to have been implemented for specific lms, e.g.
scores = lf.score('{{x}} + {{y}} =', ['1', '2', '3'], lm=lf.llms.Gpt4o(), x=1, y=2)
# NotImplementedError: Gpt4o does not support scoring.
I guess you can add the _score function inside the llm/openai.py. I will try to make a pull request later. The repo idea is really good to be honest :( .