9 Commits

Author SHA1 Message Date
Eugene Yurtsev e3f64f277a add not maintained (#26) 2024-08-01 11:41:38 -04:00
Ikko Eltociear Ashimine c5f561da6e Fix typo in introduction.ipynb (#21)
funtions -> functions
2023-10-06 17:03:55 -04:00
Predrag Gruevski 3ff713763a Release only from merged commits on main branch. (#20) 2023-08-21 13:21:05 -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
7 changed files with 30 additions and 13 deletions
+3 -6
View File
@@ -1,9 +1,7 @@
name: release
on:
pull_request:
types:
- closed
push:
branches:
- main
paths:
@@ -15,9 +13,8 @@ env:
jobs:
if_release:
if: |
${{ github.event.pull_request.merged == true }}
&& ${{ contains(github.event.pull_request.labels.*.name, 'release') }}
# Disallow publishing from branches that aren't `main`.
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
+15
View File
@@ -1,5 +1,14 @@
[![Unit Tests](https://github.com/langchain-ai/kork/actions/workflows/test.yml/badge.svg?branch=main&event=push)](https://github.com/langchain-ai/kork/actions/workflows/test.yml)
# NOT MAINTAINED
`Kork` was a prototype for agents that can take multiple (dependent) actions at once; i.e., when the input of action 2 depends on the output from action 1.
This is distinct from parallel tool use where the inputs into the tools are independent of the tools outputs.
We're currently not maintaining Kork, but you're welcome to use it for your own research.
# Kork ![alt The Parrot](assets/parrot.png)
`Kork` is an *experimental* [Langchain chain](https://python.langchain.com/en/latest/modules/chains.html) that helps build natural language APIs powered by LLMs.
@@ -11,6 +20,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": [
+1 -1
View File
@@ -85,7 +85,7 @@
"\n",
"Information about these functions will be added into the prompt to let the LLM know it can use them.\n",
"\n",
"The funtions will also be added as foregin functions into the kork interpreter environment, so the interpreter can actually use them!"
"The functions will also be added as foregin functions into the kork interpreter environment, so the interpreter can actually use them!"
]
},
{
+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"