-
Notifications
You must be signed in to change notification settings - Fork 2
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
PEBC skeleton class implementation #60
base: main
Are you sure you want to change the base?
Conversation
…erEnvelope classes; remove obsolete PEBCPowerEnvelopeLimitType
…nergy constraint module
…nergy constraint module
"error": { "message": "We could not parse the JSON body of your request. (HINT: This likely means you aren't using your HTTP library correctly. The OpenAI API expects a JSON payload, but what was sent was not valid JSON. If you have trouble figuring out how to fix this, please contact us through our help center at help.openai.com.)", "type": "invalid_request_error", "param": null, "code": null } } null
"model": "gpt-4", "messages": [ { "role": "system", "content": "You are a helpful assistant that creates concise, meaningful git commit messages based on code changes." }, { "role": "user", "content": "Generate a commit message for the following changes:\n src/s2python/pebc/pebc_instruction.py | 1 + src/s2python/pebc/pebc_power_constraints.py | 1 + 2 files changed, 2 insertions(+)\nFiles changed:\nsrc/s2python/pebc/pebc_instruction.py,src/s2python/pebc/pebc_power_constraints.py," } ] } OpenAI API Response: { "error": { "message": "We could not parse the JSON body of your request. (HINT: This likely means you aren't using your HTTP library correctly. The OpenAI API expects a JSON payload, but what was sent was not valid JSON. If you have trouble figuring out how to fix this, please contact us through our help center at help.openai.com.)", "type": "invalid_request_error", "param": null, "code": null } } null
"model": "gpt-4", "messages": [ { "role": "system", "content": "You are a helpful assistant that creates concise, meaningful git commit messages based on code changes." }, { "role": "user", "content": "Generate a commit message for the following changes:\n src/s2python/pebc/pebc_instruction.py | 1 - src/s2python/pebc/pebc_power_constraints.py | 1 - 2 files changed, 2 deletions(-)\nFiles changed:\nsrc/s2python/pebc/pebc_instruction.py,src/s2python/pebc/pebc_power_constraints.py" } ] } OpenAI API Response: { "error": { "message": "We could not parse the JSON body of your request. (HINT: This likely means you aren't using your HTTP library correctly. The OpenAI API expects a JSON payload, but what was sent was not valid JSON. If you have trouble figuring out how to fix this, please contact us through our help center at help.openai.com.)", "type": "invalid_request_error", "param": null, "code": null } } null
"model": "gpt-4", "messages": [ { "role": "system", "content": "You are a helpful assistant that creates concise, meaningful git commit messages based on code changes." }, { "role": "user", "content": "Generate a commit message for the following changes:\n src/s2python/pebc/pebc_instruction.py | 1 + src/s2python/pebc/pebc_power_constraints.py | 1 + 2 files changed, 2 insertions(+) \nFiles changed:\nsrc/s2python/pebc/pebc_instruction.py,src/s2python/pebc/pebc_power_constraints.py," } ] } OpenAI API Response: { "id": "chatcmpl-Al2WJ2cNcBy1e7SuAXcIMjLbcFdBs", "object": "chat.completion", "created": 1735774467, "model": "gpt-4-0613", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "Added new code lines in pebc_instruction.py and pebc_power_constraints.py", "refusal": null }, "logprobs": null, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 116, "completion_tokens": 16, "total_tokens": 132, "prompt_tokens_details": { "cached_tokens": 0, "audio_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 0, "audio_tokens": 0, "accepted_prediction_tokens": 0, "rejected_prediction_tokens": 0 } }, "system_fingerprint": null } Added new code lines in pebc_instruction.py and pebc_power_constraints.py
"model": "gpt-4", "messages": [ { "role": "system", "content": "You are a helpful assistant that creates concise, meaningful git commit messages based on code changes." }, { "role": "user", "content": "Generate a commit message for the following changes:\n src/s2python/pebc/pebc_instruction.py | 1 - src/s2python/pebc/pebc_power_constraints.py | 1 - 2 files changed, 2 deletions(-) \nFiles changed:\nsrc/s2python/pebc/pebc_instruction.py,src/s2python/pebc/pebc_power_constraints.py," } ] } Removed unnecessary lines from pebc_instruction.py and pebc_power_constraints.py
"model": "gpt-4", "messages": [ { "role": "system", "content": "You are a helpful assistant that creates concise, meaningful git commit messages based on code changes." }, { "role": "user", "content": "Generate a commit message for the following changes:\n src/s2python/pebc/pebc_instruction.py | 1 + src/s2python/pebc/pebc_power_constraints.py | 1 + 2 files changed, 2 insertions(+) \nFiles changed:\nsrc/s2python/pebc/pebc_instruction.py,src/s2python/pebc/pebc_power_constraints.py," } ] } OpenAI API Response: { "id": "chatcmpl-AlAbv6QhnCJYGj5n7bQAdF7PiD0iT", "object": "chat.completion", "created": 1735805567, "model": "gpt-4-0613", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "Added new functionalities to pebc_instruction and pebc_power_constraints files", "refusal": null }, "logprobs": null, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 116, "completion_tokens": 14, "total_tokens": 130, "prompt_tokens_details": { "cached_tokens": 0, "audio_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 0, "audio_tokens": 0, "accepted_prediction_tokens": 0, "rejected_prediction_tokens": 0 } }, "system_fingerprint": null } Added new functionalities to pebc_instruction and pebc_power_constraints files
… modules in s2python.
…y files in s2python module
This will resolve #64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for implementing this! Your changes look good to me; however, the control type still needs to be added to s2python/s2_control_type.py
. If you add that, I think we can merge this.
P.S. I sent you an email with an extra question I had regarding the generated code.
I did not receive any emails. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding PEBC to s2_control_type.py
! However, it seems this commit also includes a bunch of build files in build/
. If you remove those, we're good to merge.
Another minor issue I discovered while working on a PEBC example: EDIT: |
This pull request introduces several new classes and updates existing ones in the
src/s2python/pebc
directory. These changes primarily involve importing necessary modules, defining new classes, and configuring model validation. The most important changes include the addition of new classes for handling PEBC constraints and envelopes, as well as updating model configurations to enable assignment validation.