Skip to content

I did some changes: refactoring, bugfixing, logging and tracking costs and usage#2

Merged
gdorsi44 merged 2 commits into
gdorsi44:mainfrom
PawelSzpyt:tracking_bugfixing_and_refactoring
Feb 17, 2024
Merged

I did some changes: refactoring, bugfixing, logging and tracking costs and usage#2
gdorsi44 merged 2 commits into
gdorsi44:mainfrom
PawelSzpyt:tracking_bugfixing_and_refactoring

Conversation

@PawelSzpyt
Copy link
Copy Markdown
Contributor

@PawelSzpyt PawelSzpyt commented Feb 16, 2024

  • Now it waits till the client finishes work
  • It tracks the program with System.out.println instructions explaining what is happening in crucial moments
  • I put all urls in properties so that they are in one place and easily accessible to make sure all of them are legit and there is no shady stuff going on in this project
  • I also put user prompt and assistant instructions in properties for easy customization
  • I changed default model to gpt-3.5-turbo because it is 15x cheaper, and the user will most likely do some test runs at first, so its gonna save him a lot of money
  • I made it simple to revert to gpt-4 model and put its name in GPTModel enum, also added a comment about the current pricing and limitations
  • Also some minor adjustments like removing some unnecessary comment and adjusting variable names to make the code more understandable
  • I added println that will show you all the responses so that you see what you are billed for Not the nicest code I ever written but its decent and gets the job done. I have massive concerns with Assistant API from OpenAI, not sure if I want to contribute and use it. Basically, a single and simple instruction and message that should be answered with a few words might result in tens of responses and there is no way to control that. Will report these concerns as Issue.

I have some big concerns about Assistant API frop OpenAI, I created an issue. Please review them.

- Now it waits till the client finishes work
- It tracks the program with System.out.println instructions explaining what is happening in crucial moments
- I put all urls in properties so that they are in one place and easily accessible to make sure all of them are legit and there is no shady stuff going on in this project
- I also put user prompt and assistant instructions in properties for easy customization
- I changed default model to gpt-3.5-turbo because it is 15x cheaper, and the user will most likely do some test runs at first, so its gonna save him a lot of money
- I made it simple to revert to gpt-4 model and put its name in GPTModel enum, also added a comment about the current pricing and limitations
- Also some minor adjustments like removing some unnecessary comment and adjusting variable names to make the code more understandable
- I added println that will show you all the responses so that you see what you are billed for
Not the nicest code I ever written but its decent and gets the job done. I have massive concerns with Assistant API from OpenAI, not sure if I want to contribute and use it. Basically, a single and simple instruction and message that should be answered with a few words might result in tens of responses and there is no way to control that. Will report these concerns as Issue.
@PawelSzpyt PawelSzpyt changed the title I did some changes: I did some changes: refactoring, bugfixing, logging and tracking costs and usage Feb 16, 2024
Assistant API might get very expensive in case of any issue during processing the prompt, therefore I added appropriate section in README.md. These issues forced me to stop of using Assistant API, and I think users should be aware of risks associated with using Assistant API.
Copy link
Copy Markdown
Owner

@gdorsi44 gdorsi44 left a comment

Choose a reason for hiding this comment

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

Approved, thank you for your work!

@gdorsi44 gdorsi44 merged commit cc8a424 into gdorsi44:main Feb 17, 2024
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