7 Commits

Author SHA1 Message Date
Eugene Yurtsev 53421907d6 x 2023-05-15 14:51:19 -04:00
Eugene Yurtsev 71b6f3fa8c Version 0.0.3 (#16)
See release notes.
2023-05-12 11:32:44 -04:00
Eugene Yurtsev a489293c86 Make display code more robust (#15)
Make display code more robust
2023-05-12 11:27:38 -04:00
Eugene Yurtsev e5330b9f9c Use smaller cats image (#14)
use smaller image
2023-05-12 10:51:52 -04:00
Eugene Yurtsev feee9ed2b4 Update img size on README (#13)
Update image size on README
2023-05-12 10:49:24 -04:00
Eugene Yurtsev 5c6e42d5cd Add example to README (#12)
Add example to README
2023-05-12 10:42:21 -04:00
Eugene Yurtsev ecd1d9f941 Update Image Manipulation Example (#11)
Hide inputs in image manipulation doc
2023-05-12 10:27:45 -04:00
6 changed files with 803 additions and 6 deletions
+6
View File
@@ -11,6 +11,12 @@
3. Execute the program generated by the LLM **safely**.
4. Program generation takes a single LLM call, as opposed to agents that use a call per action taken.
## Show me! 😹
[Image manipulation API using PIL](https://langchain-ai.github.io/kork/examples/image_manipulation.html)
<img src="assets/cats.png" alt="Cats!!!" style="max-width: 500px;">
## How
The chain takes a user query, translates it into a program, and executes it using the `Kork` interpreter.
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

@@ -184,7 +184,9 @@
"pycharm": {
"name": "#%%\n"
},
"tags": []
"tags": [
"hide-input"
]
},
"outputs": [],
"source": [
File diff suppressed because one or more lines are too long
+6 -3
View File
@@ -42,8 +42,6 @@ class HtmlResult(TypedDict):
class _NoExpectedAnswer:
"""A sentinel class to indicate that there is no expected answer."""
pass
NO_EXPECTED_ANSWER = _NoExpectedAnswer()
@@ -61,7 +59,12 @@ def as_html_dict(
code = code_result["code"].strip()
if pretty_print:
code = AstPrinter().visit(parse(code), pretty_print=True)
try:
code = AstPrinter().visit(parse(code), pretty_print=True)
except Exception:
# This is display code. Broad exception handling OK for now
# we can make the code more robust later.
code = code
else:
code = code
+2 -2
View File
@@ -1,7 +1,7 @@
[tool.poetry]
name = "kork"
version = "0.0.2"
description = "Programming with LLMs"
version = "0.0.3"
description = "Natural Language Interfaces Powered by LLMs"
authors = ["LangChain"]
license = "MIT"
readme = "README.md"