Skip to content

Conversation

@wkukka1
Copy link
Collaborator

@wkukka1 wkukka1 commented Jul 8, 2025

Updates:

  • added --json_schema arg to cli
  • updated OpenAIModel, OpenAIVectorModel, Codellama, DeepSeek-R1, and DeepSeek-v3 to use json schema if supplied
  • added integration tests for above models to validate json schema
  • added json schema for annotations for testing purposes

@wkukka1 wkukka1 requested a review from Rolland-He July 8, 2025 21:02
Copy link
Collaborator

@Rolland-He Rolland-He left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @wkukka1 , good work! I've left one inline comment.

self.model = self.client.beta.assistants.create(
name="Markus LLM model",
model="gpt-4-turbo",
model="gpt-4o-mini",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure whether this is related to the PR.

Copy link
Collaborator Author

@wkukka1 wkukka1 Jul 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got approval from @david-yz-liu to do this since the gpt-4-turbo model doesn't support structured responses using the response_format arg.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@wkukka1 wkukka1 requested a review from david-yz-liu July 9, 2025 13:59
Optional[Tuple[str, str]]: A tuple containing the prompt and the model's response,
or None if the response was invalid.
"""
schema = None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep the code structure consistent with the other classes (if-else, etc.) Also keep the open call the same, with the utf-8 encoding

response = self._call_openai(prompt, system_instructions)
if json_schema:
schema_path = Path(json_schema)
if not schema_path.exists():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nice check; please add this to all of the classes.

@wkukka1 wkukka1 requested a review from david-yz-liu July 9, 2025 17:56
@david-yz-liu david-yz-liu merged commit b251f8d into MarkUsProject:main Jul 10, 2025
2 checks passed
wkukka1 added a commit to wkukka1/ai-autograding-feedback that referenced this pull request Aug 29, 2025
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

Successfully merging this pull request may close these issues.

3 participants