diff --git a/config.toml b/config.toml index 2cadf15..7b8c563 100644 --- a/config.toml +++ b/config.toml @@ -23,10 +23,7 @@ paths = [] [discussion] history = [ - "User:\nAdd support for properly handling files that we have in config with anthropics api (your context will have documentation reguarding it). This will allow us to free up the main markdown file were sending as a message.\nWe also want to make sure the messaging of that giant markdown is chunked as anthropic does have an upper limit per messages.\nAI:\nGood. Now the big rewrite of `ai_client.py`. The strategy:\n\n- Add a new `_send_anthropic_files` path that uses `file_cache.get_file_id()` to upload files individually as `document`/`image` content blocks, keeping the context message lean\n- The fallback (and also for oversized content) uses chunked text blocks — split the markdown into ≤180k-char chunks (well under the ~200k token limit with headroom for overhead), each sent as a separate `text` content block with `cache_control` on the last one\n- `send()` now accepts an optional `file_items` parameter from aggregate\n- `reset_session()` also resets the file_cache client\nUser:\ncontinue. Also got this error when trying to run latest version of this program. However I can use an old version for now.\nAi:\nNow fix `gui.py` — patch the three 2-tuple unpack sites and thread `file_items` through to `send()`:\n[User]\ncontinue. My bad the error in comms was shown int he screenshot I linked. in the md context. Make sure to update MainContext.md when done.\nAI:\nfinished without sending a response...\nUser:\nSeems to be working...! \nMake a richer discussioon history editor, with structual support for the user/ai message nodes and buttons in the reponse and message panels for adding their entries to it on click.\nAI:\nThe existing format already uses `[User]\\n...` and `[AI]\\n...` prefixes. The new structured editor will parse those naturally and write them back in the same format. Now let me implement the full changes:\nUser:\nYou had failres in your last few called scripts. Git diff shows now changes to python files.\nI'll add the comms and tool logs to your context. \nWe should remove the script content from the tool log and just save the script name so that it doesn't bloat it. \nSame with omitting full message sent in the comms log, very expensive to send to you or read manually.\nVendor API:\nERROR: Error code: 400 - {'type': 'error', 'error': {'type': 'invalid_request_error', 'message': 'A maximum of 4 blocks with cache_control may be provided. Found 5.'}, 'request_id': 'req_011CYMxgMXvcZUVFNyFz1Lx8'}", - "[User]:\nI'm not able to send a message for a while now...\n(Message finally sent)", - "[AI]\nCompleted without a response message showing up.", - "[User]\nRestarts custom prompting program.", + "User:\nAdd support for properly handling files that we have in config with anthropics api (your context will have documentation reguarding it). This will allow us to free up the main markdown file were sending as a message.\nWe also want to make sure the messaging of that giant markdown is chunked as anthropic does have an upper limit per messages.\nAI:\nGood. Now the big rewrite of `ai_client.py`. The strategy:\n\n- Add a new `_send_anthropic_files` path that uses `file_cache.get_file_id()` to upload files individually as `document`/`image` content blocks, keeping the context message lean\n- The fallback (and also for oversized content) uses chunked text blocks — split the markdown into ≤180k-char chunks (well under the ~200k token limit with headroom for overhead), each sent as a separate `text` content block with `cache_control` on the last one\n- `send()` now accepts an optional `file_items` parameter from aggregate\n- `reset_session()` also resets the file_cache client\nUser:\ncontinue. Also got this error when trying to run latest version of this program. However I can use an old version for now.\nAi:\nNow fix `gui.py` — patch the three 2-tuple unpack sites and thread `file_items` through to `send()`:\n[User]\ncontinue. My bad the error in comms was shown int he screenshot I linked. in the md context. Make sure to update MainContext.md when done.\nAI:\nfinished without sending a response...\nUser:\nSeems to be working...! \nMake a richer discussioon history editor, with structual support for the user/ai message nodes and buttons in the reponse and message panels for adding their entries to it on click.\nAI:\nThe existing format already uses `[User]\\n...` and `[AI]\\n...` prefixes. The new structured editor will parse those naturally and write them back in the same format. Now let me implement the full changes:\nUser:\nYou had failres in your last few called scripts. Git diff shows now changes to python files.\nI'll add the comms and tool logs to your context. \nWe should remove the script content from the tool log and just save the script name so that it doesn't bloat it. \nSame with omitting full message sent in the comms log, very expensive to send to you or read manually.\nVendor API:\nERROR: Error code: 400 - {'type': 'error', 'error': {'type': 'invalid_request_error', 'message': 'A maximum of 4 blocks with cache_control may be provided. Found 5.'}, 'request_id': 'req_011CYMxgMXvcZUVFNyFz1Lx8'}\nUser:\nI'm not able to send a message for a while now...\n(Message finally sent)\nAI:\nCompleted without a response message showing up.\nUser:\nRestarts custom prompting program.\nUser:\nOk lets try this again...\nLets do the discussion history improvmeents. I want a sort of visual editor where each entry is its own block. \nThere should be a role field and a content filed and I should have buttons for appending the current response or current message to it\n. I should be able to insert or remove anywhere as well.\nVendor API:\nERROR: Error code: 500 - {'type': 'error', 'error': {'type': 'api_error', 'message': 'Internal server error'}, 'request_id': 'req_011CYMyjgyfDn2b6JnPD6rvJ'}\nUser:\ncontinue...\nVendor API:\nERROR: Error code: 404 - {'type': 'error', 'error': {'type': 'not_found_error', 'message': 'File not found: file_011CYMyjXYsf951nBgTvQmkE'}, 'request_id': 'req_011CYMysoSaH2xPxVtZurjSc'}\nUser:\nreverting to older editor...", ] [ai] diff --git a/dpg_layout.ini b/dpg_layout.ini index c8a571e..5541c39 100644 --- a/dpg_layout.ini +++ b/dpg_layout.ini @@ -448,14 +448,14 @@ DockSpace ID=0x7C6B3D9B Window=0xA87D555D Pos=0,0 Size=3840, DockNode ID=0x00000008 Parent=0x00000001 SizeRef=595,1643 Split=X Selected=0x40484D8F DockNode ID=0x0000000F Parent=0x00000008 SizeRef=1275,2137 Split=Y Selected=0x07E8375F DockNode ID=0x00000011 Parent=0x0000000F SizeRef=835,425 Selected=0x72F373AE - DockNode ID=0x00000012 Parent=0x0000000F SizeRef=835,1710 Selected=0x8B149E2A + DockNode ID=0x00000012 Parent=0x0000000F SizeRef=835,1710 Selected=0x3934423A DockNode ID=0x00000010 Parent=0x00000008 SizeRef=2012,2137 Split=Y Selected=0xCE7F911A DockNode ID=0x00000013 Parent=0x00000010 SizeRef=1967,1690 Split=X Selected=0xCE7F911A DockNode ID=0x00000017 Parent=0x00000013 SizeRef=1314,1749 Selected=0x4B454E0B DockNode ID=0x00000018 Parent=0x00000013 SizeRef=1309,1749 Split=Y Selected=0x88A8C2FF DockNode ID=0x00000019 Parent=0x00000018 SizeRef=2440,1412 Split=X Selected=0x88A8C2FF DockNode ID=0x00000023 Parent=0x00000019 SizeRef=991,737 Split=Y Selected=0x7D28643F - DockNode ID=0x0000001F Parent=0x00000023 SizeRef=2440,1162 CentralNode=1 Selected=0xFDB3860E + DockNode ID=0x0000001F Parent=0x00000023 SizeRef=2440,1162 CentralNode=1 Selected=0x4F935A1E DockNode ID=0x00000020 Parent=0x00000023 SizeRef=2440,973 Split=Y Selected=0x4C2F06CB DockNode ID=0x00000027 Parent=0x00000020 SizeRef=1743,483 Selected=0x7D28643F DockNode ID=0x00000028 Parent=0x00000020 SizeRef=1743,488 Selected=0x4C2F06CB