Merged
Conversation
Contributor
There was a problem hiding this comment.
❌ Changes requested. Reviewed everything up to e0d0a4d in 24 seconds
More details
- Looked at
78lines of code in1files - Skipped
0files when reviewing. - Skipped posting
1drafted comments based on config settings.
1. continuous_eval/llm_factory.py:241
- Draft comment:
Backticks are used instripmethod, which is incorrect. Use regular quotes instead.
json_output = llm_output.strip("
").strip(" ").replace("json", "")
- **Reason this comment was not posted:**
Marked as duplicate.
</details>
Workflow ID: <workflowid>`wflow_lm2kNa2WcSNelVFV`</workflowid>
</details>
----
**Want Ellipsis to fix these issues?** Tag `@ellipsis-dev` in a comment. You can customize Ellipsis with :+1: / :-1: [feedback](https://docs.ellipsis.dev/review), review rules, user-specific overrides, `quiet` mode, and [more](https://docs.ellipsis.dev/config).
| llm_output = self.run(prompt, temperature, max_tokens=max_tokens) | ||
| if "{" in llm_output: | ||
| first_bracket = llm_output.index("{") | ||
| json_output = llm_output[first_bracket:].strip("```").strip(" ") |
Contributor
There was a problem hiding this comment.
Backticks are used in strip method, which is incorrect. Use regular quotes instead.
Suggested change
| json_output = llm_output[first_bracket:].strip("```").strip(" ") | |
| json_output = llm_output[first_bracket:].strip(" |
").strip(" ")
| elif COHERE_AVAILABLE and isinstance(self.client, CohereClient): | ||
| prompt = f"{prompt['system_prompt']}\n{prompt['user_prompt']}" | ||
| response = self.client.generate(model="command", prompt=prompt, temperature=temperature, max_tokens=max_tokens) # type: ignore | ||
| response = self.client.generate(model="command", prompt=prompt, temperature=temperature, max_tokens=1024) # type: ignore |
Contributor
There was a problem hiding this comment.
The max_tokens parameter is hardcoded to 1024. Consider using the max_tokens argument instead.
Suggested change
| response = self.client.generate(model="command", prompt=prompt, temperature=temperature, max_tokens=1024) # type: ignore | |
| response = self.client.generate(model="command", prompt=prompt, temperature=temperature, max_tokens=max_tokens) # type: ignore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updated default eval model to gpt-4o-mini
Updated json method
Summary:
Updated
continuous_eval/llm_factory.pyto setgpt-4o-minias default model, added JSON parsing method, and increased retry attempts for LLM responses.Key points:
DefaultLLMto usegpt-4o-minias the default model incontinuous_eval/llm_factory.py.jsonmethod toLLMInterfaceand implemented it inLLMFactoryto parse JSON from LLM output.LLMFactory._llm_responsefrom 15 to 50.max_tokensparameter fromLLMInterface.runmethod signature.CohereClient.generatecall to use a fixedmax_tokensvalue of 1024.Generated with ❤️ by ellipsis.dev