Skip to content
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

Factor out some functions into llm-utils #37

Merged
merged 1 commit into from
Oct 4, 2023
Merged

Factor out some functions into llm-utils #37

merged 1 commit into from
Oct 4, 2023

Conversation

nicovank
Copy link
Contributor

@nicovank nicovank commented Oct 4, 2023

This is just a proposal to factor out some functions into a common repository, for CWhy only for now.

I've used https://github.com/plasma-umass/llm-utils.

Transferred functions:

  • count_tokens
  • calculate_cost: This is not used by CWhy yet.
  • word_wrap_except_code_blocks
  • read_lines: This function is slightly different in ChatDBG, but it shouldn't be hard to make it compatible.

Future candidates:

  • complete: Or at least some version if call GPT, print error if missing OPEN_API_KEY or other error.
  • Support for other LLMs (Llama?)

Thoughts? Do we like it? Is it worth it?

@emeryberger emeryberger merged commit b6d3a56 into main Oct 4, 2023
5 checks passed
@nicovank nicovank deleted the factor-out branch October 4, 2023 20:10
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.

2 participants