News for hackers. Stuff that matters.
Re:What's up in the Python community? – April 2023 by axutio on Friday April 28, 2023 @06:26PM (#35747897)
Is this a setup you've already built? Could you outline what you've glued together for this bot?
Re:What's up in the Python community? – April 2023 by Spivak on Friday April 28, 2023 @07:36PM (#35748495)
Oh sure! So the OCR is a statically linked build of tesseract based on [1] and pytesseract [2] which is a super thin wrapper but easier than writing it yourself. The I stole/modified the prompt from [3] to get the bot to write Python programs that do date calculations. Then I used [4] to take the output in case the Llm didn't use the format I asked. I run the Python code it generates in a rootless container that uses the Lambda RIE [5] because I was too lazy to make my own thing.

[1] https://github.com/wingedrhino/static-tesseract

[2] https://pypi.org/project/pytesseract/

[3] https://python.langchain.com/en/latest/modules/agents/tools/...

[4] https://pypi.org/project/dateparser/

[5] https://docs.aws.amazon.com/lambda/latest/dg/images-test.htm...

Re:What's up in the Python community? – April 2023 by axutio on Saturday April 29, 2023 @07:12PM (#35758206)
This is amazing, thank you for sharing!