Skip to content

Comments

S2 pairing implementation#84

Closed
MauriceHendrix wants to merge 7 commits intos2_pairingfrom
main
Closed

S2 pairing implementation#84
MauriceHendrix wants to merge 7 commits intos2_pairingfrom
main

Conversation

@MauriceHendrix
Copy link
Contributor

Added S2Pairing class to implement the pairing process

MauriceHendrix and others added 6 commits March 3, 2025 09:15
updated artifacts to v4 due to github giving depracation errors en not running pipeline
* fix moved message import in frbc example

* Update ci.yml

updated artifacts to v4 due to github giving depracation errors en not running pipeline
* Add DDBC actuator and operation mode classes

* Add DDBC operation mode and actuator status classes

* Add additional DDBC classes to the initialization module

* Refactor DDBC classes for improved readability and consistency

* Refactor gen_s2.py and fix cyclic import

* Added the controll type to s2_control_type wrapper

* Fixed the new type of S2Message as union

Signed-off-by: Vlad Iftime <vladiftime60@gmail.com>

* Fixed lines too long

Signed-off-by: Vlad Iftime <vladiftime60@gmail.com>

---------

Signed-off-by: Vlad Iftime <vladiftime60@gmail.com>
* Publish branch.

* PEBC power envelope limit type

* Implement PEBCAllowedLimitRange, PEBCPowerEnvelopeElement and PEBCPowerEnvelope classes; remove obsolete PEBCPowerEnvelopeLimitType

* Implement PEBCEnergyConstraint and PEBCPowerConstraints classes; add __init__.py file

* Add PEBCInstruction class and __init__.py file; refactor imports in energy constraint module

* Add PEBCInstruction class and __init__.py file; refactor imports in energy constraint module

* null

* 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

* Payload: {
  "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

* Payload: {
  "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

* Payload: {
  "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

* Payload: {
  "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

* Payload: {
  "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

* "Updated pebc_instruction.py and removed a line from pebc_power_constraints.py"

* "Updated pebc_instruction.py and added new feature to pebc_power_constraints.py"

* Removed unnecessary code from pebc_instruction.py and pebc_power_constraints.py

* "Added new lines in pebc_instruction and pebc_power_constraints modules"

* Removed unnecessary lines in pebc_instruction.py and pebc_power_constraints.py files

* Added new relevant instructions and power constraints in the PEBC modules.

* Added missing elements in pebc_instruction and pebc_power_constraints modules in s2python.

* Added new methods to pebc_instruction.py and pebc_power_constraints.py files in s2python module

* Refactored class definitions in PEBC modules for improved readability

* Refactored class definitions in PEBC modules for improved readability

* Added the controll type to s2_control_type wrapper

* Added the controll type to s2_control_type wrapper

* Added missing classes to init

Signed-off-by: Vlad Iftime <vladiftime60@gmail.com>

* Removed build files and added the PEBC_instruction in the submodule init

Signed-off-by: Vlad Iftime <vladiftime60@gmail.com>

* Removed build files and added the PEBC_instruction in the submodule init

Signed-off-by: Vlad Iftime <vladiftime60@gmail.com>

* Fixed the new type of S2Message as union

Signed-off-by: Vlad Iftime <vladiftime60@gmail.com>

---------

Signed-off-by: Vlad Iftime <vladiftime60@gmail.com>
@MauriceHendrix MauriceHendrix marked this pull request as draft March 4, 2025 11:14
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