Sakauchi444 / argut_ai

1 stars 0 forks source link

Poe APIの調査 #14

Open Sakauchi444 opened 3 months ago

Sakauchi444 commented 3 months ago

これの「Sending messages & Streaming responses」を実行

[hibi@hibi-mbp:~/dev/hackathon/poe-gpts]
$ python3 main.py
2024-03-12 16:24:27.284 | INFO     | poe_api_wrapper.api:send_message:752 - New Thread created | 247xo2d2ee57bgqj0mc
 Reverse engineering is the process of analyzing a subject system to identify the system's components and how they are organized and interact with each other to achieve the system's overall function. The purpose is to understand and reproduce the subject system without references or documentation.

Some key aspects of reverse engineering include:

- Disassembling the subject system into its components in a methodical way. This could involve literally taking apart physical devices or software, or using tools to extract logic and code from programs and applications.

- Analyzing how each component works and identifying its role and interactions with other pieces. This helps map out the overall architecture and logic flow.

- Documenting findings to achieve an understanding of how the system was designed and built. This allows reproducing or developing something similar without access to the original design documents.

- The end goal is not necessarily copying or replicating the subject system, but understanding its inner workings to either reproduce it or potentially improve upon the design for one's own purposes.

Reverse engineering is commonly used in software, electronics, and other industries to analyze proprietary systems, evaluate competitors' products, ensure compatibility, or identify areas for enhancements. It can help facilitate interoperability or pave the way for derivative works.

2024-03-12 16:24:31.706 | INFO     | poe_api_wrapper.api:send_message:752 - New Thread created | 247xoeypao9wmtq9cwt
 Reverse engineering is the process of analyzing a subject system to identify its components and their interrelationships and create representations of the system in a form different from the original. The goal is to achieve a level of understanding of an existing machine, device, system, or software program sufficient to enable the design and production of another system with similar technical characteristics without access to the original blueprints or specifications.

Some key aspects of reverse engineering include:

- Decompiling or disassembling something to understand its internal structure and workings. This often involves taking something designed for one purpose and replicating or modifying it for another purpose.

- Analyzing how all the parts of a system interact and affect each other to understand the overall design and functionality without prior knowledge about design details.

- Documenting the design in a way that others can understand it to facilitate replication or modification of the system. The representation created through reverse engineering may be in diagrams, schematics, code, or other forms.

- The goal is gaining knowledge about a system's inner workings and design through examination rather than having pre-existing documentation or plans. It's a process of discovery rather than following existing documentation.

So in summary, reverse engineering is the process of gleaning technological insights and designs from something by taking it apart, examining it, and documenting the findings, without initial detailed blueprints or knowledge about the original design process. It allows recreating or modifying technological systems through examination rather than existing plans or specifications.
 Reverse engineering is the process of analyzing a subject system to identify its components and their interactions in order to create representations of the system in another form or at a higher level of abstraction.

The main goals of reverse engineering are:

- Understanding the design and construction of an artifact, system, or product. This allows learning how it works and how it was built.

- Extracting knowledge or design information from the artifact without access to the original documentation or decision making by the creators. Many legal products have no available documentation or schematics.

- Generating specifications, documentation, flow charts, architecture diagrams, source code, or other forms from existing products to aid in interoperability, compatibility, modification or repair.

- Creating an open architecture version of a product to allow for alternative implementations or customized derivatives. Some systems are made with proprietary interfaces.

- Re-implementing the design in a new technology when the original design technology is obsolete or unavailable. This allows migrating old systems to new platforms.

- Identifying security vulnerabilities and potential for exploits. Cybersecurity research relies significantly on reverse engineering techniques.

So in summary, reverse engineering involves taking something made by someone else and figuring out how it works to understand, build upon, or reproduce it - without necessarily having access to the original blueprints or designs. It's an analytical problem-solving process.Traceback (most recent call last):
  File "/Users/hibi/dev/hackathon/poe-gpts/poe/lib/python3.12/site-packages/poe_api_wrapper/api.py", line 802, in send_message
    human_message_id = human_message["node"]["messageId"]
                       ~~~~~~~~~~~~~^^^^^^^^
TypeError: 'NoneType' object is not subscriptable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/hibi/dev/hackathon/poe-gpts/main.py", line 33, in <module>
    for chunk in client.send_message(bot, message, chatId=59726162):
  File "/Users/hibi/dev/hackathon/poe-gpts/poe/lib/python3.12/site-packages/poe_api_wrapper/api.py", line 804, in send_message
    raise RuntimeError(f"An unknown error occurred. Raw response data: {message_data}")
RuntimeError: An unknown error occurred. Raw response data: {'data': {'messageEdgeCreate': {'message': None, 'status': 'no_access', 'statusMessage': 'Your access to this chat is not allowed.', 'failedUrls': [], 'bot': {'nickname': 'a2', 'id': 'Qm90OjEwMDY=', 'displayName': 'Claude-instant', 'messageTimeoutSecs': 15, 'introduction': '', 'messageUsageLimit': {'totalBalance': None, 'freeLimit': None, 'limitType': 'free_message', 'id': 'TWVzc2FnZUxpbWl0OjE6MA==', 'canSendMessage': True, 'shouldPromptSubscription': False, 'shouldShowLimitInfoBanner': False}, 'messagePointLimit': {'numRemainingMessages': None, 'remainingMessagesLimitReason': None, 'id': 'TWVzc2FnZVBvaW50TGltaXQ6MTAwNjo4MjkwMTU0MzY=', 'displayMessagePointPrice': 0, 'shouldShowReminderBanner': False}, 'isApiBot': False, 'serverBotDependenciesLimitsString': None, 'baseModelDisplayName': 'Claude-instant', 'limitedAccessType': 'no_limit', 'botId': 1006, 'isPrivateBot': False, 'allowsImageAttachments': True, 'shouldHideLimitedAccessTag': False, 'deletionState': 'not_deleted', 'picture': {'__typename': 'LocalBotImage', 'localName': 'Avatar_Placeholder_Orange'}, 'handle': 'Claude-instant', '__isNode': 'Bot', 'canUserAccessBot': True, 'mayHaveSuggestedReplies': True, 'supportsResend': False, 'supportsRemix': False, 'isCreatedByPoeUserAccount': True}}}, 'extensions': {'is_final': True}}
(poe)
Sakauchi444 commented 3 months ago
2024-03-12 18:25:53.205 | INFO     | poe_api_wrapper.api:send_message:752 - New Thread created | 248eltbpkgn3icmqk2j
 空が青い理由は主に以下の2点です。

1. 海津効果

大気中に含まれる水蒸気などの分子が、空気中を移動する光(可視光線)を散乱します。この現象は、波長が短い青色光が散乱されやすく、波長が長い赤色光よりも強く見えるため、空は青く見えます。

2. 酸素分子の吸収線

大気中の酸素分子は、赤色光を吸収する特性があります。このため、空からの光は青味がかかります。

したがって、空が青く見える理由は、主に大気中の分子や酸素分子による光の散乱と吸収作用によるものだと考えられています。海津効果が最も大きな影響 factor となっています。
 1

2024-03-12 18:25:57.621 | INFO     | poe_api_wrapper.api:send_message:752 - New Thread created | 248em7gw3a1c0pq1t58
 空が青く見える理由は主に以下の2点です。

1. 光の散乱現象
太陽光が大気中の分子や微小な粒子に当たって散乱される際、短波長の青い光線はより強く散乱される性質があるため、目に入る光の主体が青味を帯びた光になります。

2. 酸素分子
大気中に含まれる酸素分子は、赤外線領域の波長の光を吸収しやすく、青~緑方向の短波長の光を透過しやすい特性があります。

つまり、空は青く見えるのは、大気中を進む光が短波長の青い光を選択的に散乱・透過する性質に起因している、というのが通説です。ただし晴れた空の青さは、時間や位置によって若干異なります。
chunk: {'id': 'TWVzc2FnZToxMzQzMTc5MTM1MTM=', 'messageId': 134317913513, 'creationTime': 1710235557334246, 'clientNonce': None, 'state': 'complete', 'text': ' 空が青く見える理由は主に以下の2点です。\n\n1. 光の散乱現象\n太陽光が大気中の分子や微小な粒子に当たって散乱される際、短波長の青い光線はより強く散乱される性質があるため、目に入る光の主体が青味を帯びた光になります。\n\n2. 酸素分子\n大気中に含まれる酸素分子は、赤外線領域の波長の光を吸収しやすく、青~緑方向の短波長の光を透過しやすい特性があります。\n\nつまり、空は青く見えるのは、大気中を進む光が短波長の青い光を選択的に散乱・透過する性質に起因している、というのが通説です。ただし晴れた空の青さは、時間や位置によって若干異なります。', 'author': 'a2', 'contentType': 'text_markdown', 'sourceType': 'chat_input', 'attachments': [], 'bot': {'displayName': 'Claude-instant', 'id': 'Qm90OjEwMDY=', 'handle': 'Claude-instant', 'nickname': 'a2', 'messageTimeoutSecs': 15, 'introduction': '', 'isApiBot': False, 'baseModelDisplayName': 'Claude-instant', 'botId': 1006, 'isPrivateBot': False, 'allowsImageAttachments': True, 'shouldHideLimitedAccessTag': False, 'deletionState': 'not_deleted', 'picture': {'__typename': 'LocalBotImage', 'localName': 'Avatar_Placeholder_Orange'}, '__isNode': 'Bot', 'canUserAccessBot': True, 'mayHaveSuggestedReplies': True, 'supportsResend': False, 'supportsRemix': False, 'isCreatedByPoeUserAccount': True}, 'vote': None, 'suggestedReplies': [], 'hasCitations': False, '__isNode': 'Message', 'textLengthOnCancellation': None, 'chatCode': '248em7gw3a1c0pq1t58', 'chatId': 371180969, 'title': None, 'response': ''}
chatCode: 248em7gw3a1c0pq1t58, chatId: 371180969, title:None
 空の色が青い理由は主に以下の通りです。

- 太陽光の影響では、短波長の青色や紫外線の光がほとんど散乱されず通過する一方、長波長の赤色やオレンジ色の光は空気分子やアエロゾルなど小さな粒子によって散乱されます。

- 空気中の分子や粒子は、青色や紫外線域の光子よりも赤色域の光子の方が波長が長いため、赤色光よりも青色光の方が散乱されやすいです。

- 我々の目に入る光の大部分は散乱された光で、波長の短い青色光の方が集められます。その結果、空は青く見えるようになります。

- 大気中の水蒸気量が多いと、散乱される光の波長帯域が広がります。曇天時や雨天時は空は白っぽく見えます。

以上の理由で、晴れた日の空は青色に見えるのです。空気中の分子や粒子の影響で、青色光が優先的に目に入ることで空の色は青く見えます。chunk: {'id': 'TWVzc2FnZToxMzQwMDE2MzI4MDY=', 'messageId': 134001632806, 'creationTime': 1710235562370115, 'clientNonce': None, 'state': 'complete', 'text': ' 空の色が青い理由は主に以下の通りです。\n\n- 太陽光の影響では、短波長の青色や紫外線の光がほとんど散乱されず通過する一方、長波長の赤色やオレンジ色の光は空気分子やアエロゾルなど小さな粒子によって散乱されます。\n\n- 空気中の分子や粒子は、青色や紫外線域の光子よりも赤色域の光子の方が波長が長いため、赤色光よりも青色光の方が散乱されやすいです。\n\n- 我々の目に入る光の大部分は散乱された光で、波長の短い青色光の方が集められます。その結果、空は青く見えるようになります。\n\n- 大気中の水蒸気量が多いと、散乱される光の波長帯域が広がります。曇天時や雨天時は空は白っぽく見えます。\n\n以上の理由で、晴れた日の空は青色に見えるのです。空気中の分子や粒子の影響で、青色光が優先的に目に入ることで空の色は青く見えます。', 'author': 'a2', 'contentType': 'text_markdown', 'sourceType': 'chat_input', 'attachments': [], 'bot': {'displayName': 'Claude-instant', 'id': 'Qm90OjEwMDY=', 'handle': 'Claude-instant', 'nickname': 'a2', 'messageTimeoutSecs': 15, 'introduction': '', 'isApiBot': False, 'baseModelDisplayName': 'Claude-instant', 'botId': 1006, 'isPrivateBot': False, 'allowsImageAttachments': True, 'shouldHideLimitedAccessTag': False, 'deletionState': 'not_deleted', 'picture': {'__typename': 'LocalBotImage', 'localName': 'Avatar_Placeholder_Orange'}, '__isNode': 'Bot', 'canUserAccessBot': True, 'mayHaveSuggestedReplies': True, 'supportsResend': False, 'supportsRemix': False, 'isCreatedByPoeUserAccount': True}, 'vote': None, 'suggestedReplies': [], 'hasCitations': False, '__isNode': 'Message', 'textLengthOnCancellation': None, 'chatCode': '2i58ciex72dom7im83r', 'chatId': None, 'title': None, 'response': ''}
Traceback (most recent call last):
  File "/Users/hibi/dev/hackathon/poe-gpts/poe/lib/python3.12/site-packages/poe_api_wrapper/api.py", line 802, in send_message
    human_message_id = human_message["node"]["messageId"]
                       ~~~~~~~~~~~~~^^^^^^^^
TypeError: 'NoneType' object is not subscriptable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/hibi/dev/hackathon/poe-gpts/main.py", line 34, in <module>
    for chunk in client.send_message(bot, message, chatId=59726162):
  File "/Users/hibi/dev/hackathon/poe-gpts/poe/lib/python3.12/site-packages/poe_api_wrapper/api.py", line 804, in send_message
    raise RuntimeError(f"An unknown error occurred. Raw response data: {message_data}")
RuntimeError: An unknown error occurred. Raw response data: {'data': {'messageEdgeCreate': {'message': None, 'status': 'no_access', 'statusMessage': 'Your access to this chat is not allowed.', 'failedUrls': [], 'bot': {'nickname': 'a2', 'id': 'Qm90OjEwMDY=', 'displayName': 'Claude-instant', 'messageTimeoutSecs': 15, 'introduction': '', 'messageUsageLimit': {'totalBalance': None, 'freeLimit': None, 'limitType': 'free_message', 'id': 'TWVzc2FnZUxpbWl0OjE6MA==', 'canSendMessage': True, 'shouldPromptSubscription': False, 'shouldShowLimitInfoBanner': False}, 'messagePointLimit': {'numRemainingMessages': None, 'remainingMessagesLimitReason': None, 'id': 'TWVzc2FnZVBvaW50TGltaXQ6MTAwNjo4MjkwMTU0MzY=', 'displayMessagePointPrice': 0, 'shouldShowReminderBanner': False}, 'isApiBot': False, 'serverBotDependenciesLimitsString': None, 'baseModelDisplayName': 'Claude-instant', 'limitedAccessType': 'no_limit', 'botId': 1006, 'isPrivateBot': False, 'allowsImageAttachments': True, 'shouldHideLimitedAccessTag': False, 'deletionState': 'not_deleted', 'picture': {'__typename': 'LocalBotImage', 'localName': 'Avatar_Placeholder_Orange'}, 'handle': 'Claude-instant', '__isNode': 'Bot', 'canUserAccessBot': True, 'mayHaveSuggestedReplies': True, 'supportsResend': False, 'supportsRemix': False, 'isCreatedByPoeUserAccount': True}}}, 'extensions': {'is_final': True}}
(poe)
Sakauchi444 commented 3 months ago

~chatCode, ChatIdどちらかをConversationsIDにしても良さそう.~ ~→chatCodeをConversationsIDにする.~ →できないことが判明(gptとcluade3それぞれにchatcodeが存在するから)

Sakauchi444 commented 3 months ago
chunk: {'id': 'TWVzc2FnZToxMzQzMTc5MTM1MTM=', 'messageId': 134317913513, 
'creationTime': 1710235557334246, 'clientNonce': None, 'state': 'complete', 
'text': ' 空が青く見える理由は主に以下の2点です。\n\n1. 光の散乱現象\n太陽光が大気中の分子や微小な粒子に当たって散乱される際、短波長の青い光線はより強く散乱される性質があるため、目に入る光の主体が青味を帯びた光になります。\n\n2. 酸素分子\n大気中に含まれる酸素分子は、赤外線領域の波長の光を吸収しやすく、青~緑方向の短波長の光を透過しやすい特性があります。\n\nつまり、空は青く見えるのは、大気中を進む光が短波長の青い光を選択的に散乱・透過する性質に起因している、というのが通説です。ただし晴れた空の青さは、時間や位置によって若干異なります。', 
'author': 'a2', 'contentType': 'text_markdown', 'sourceType': 'chat_input', 'attachments': [], 
'bot': {'displayName': 'Claude-instant', 'id': 'Qm90OjEwMDY=', 'handle': 'Claude-instant', 'nickname': 'a2', 'messageTimeoutSecs': 15, 'introduction': '', 'isApiBot': False, 'baseModelDisplayName': 'Claude-instant', 
'botId': 1006, 'isPrivateBot': False, 'allowsImageAttachments': True, 'shouldHideLimitedAccessTag': False, 'deletionState': 'not_deleted', 'picture': {'__typename': 'LocalBotImage', 'localName': 'Avatar_Placeholder_Orange'}, '__isNode': 'Bot', 'canUserAccessBot': True, 'mayHaveSuggestedReplies': True, 'supportsResend': False, 
'supportsRemix': False, 'isCreatedByPoeUserAccount': True}, 'vote': None, 'suggestedReplies': [], 'hasCitations': False, '__isNode': 'Message', 'textLengthOnCancellation': None, 
'chatCode': '248em7gw3a1c0pq1t58', 'chatId': 371180969, 'title': None, 'response': ''}