実行例で理解する `Runnable` の継承者たち in `langchain` - Qiita

概要この記事では、LLM(Large Language Models)を活用したアプリケーション開発のためのフレームワーク、langchainにおけるRunnableクラスを継承しているクラスにつ…

Qiita

Runme is a great new notebook approach to run scripts from markdown docs with CLI integration and multi-language support every dev and data scientist should try in #VSCode.

With #Runme versatile notebook kernel, CLI interop, and shared #Runbook session state you can now make your docs truly interactive.

Give your markdown docs new #Runnable lifespan and get creative with your fenced code outputs. You'll never just read the Intro and README docs.

#codeNotebooks 📚 ...

https://docs.runme.dev/

Home • RUNME

Runme is a tool that makes runbooks actually runnable, making it easier to follow step-by-step instructions. Users can execute instructions, check intermediate results, and ensure the desired outputs are achieved. Authors can create predefined golden paths and share them with others. Runme combines the guardrails of a pipeline with the flexibility of scripting, where users can check intermediary results before moving on.

Runme.dev

Use case for returning a #Runnable from a #Function in the #java #programming #language:

````java
Optional.<String>ofNullable(null)
.ifPresentOrElse(
input -> { /* consume */ },
logError.apply("No value given?")
);
````

in which logError is a Function you create, that accepts a String and returns the Runnable.

Since nobody has every written this up, according to big influential search engines, here's how to create a #java #Function that returns a #Runnable:

````java
static Function<String, Runnable> f = (final String input) -> {
return () -> {/*
use input for something
*/}
};
````