langfun icon indicating copy to clipboard operation
langfun copied to clipboard

Scoring implementation

Open May0Mei opened this issue 10 months ago • 1 comments

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.

May0Mei avatar Feb 19 '25 18:02 May0Mei

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 :( .

JasonHonKL avatar Mar 09 '25 12:03 JasonHonKL