Llm.ev.openai: def of bend-kit-llm@0.13.0.1 Import: import bend-kit-llm@0.13.0.1/llm.bend as Llm Lines 234-238 of bend-kit-llm@0.13.0.1/llm.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-llm@0.13.0.1/llm.bend&start_line=234&end_line=238 import Base import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes def ev.openai(+s: String) -> Ev: +d = ev.doc(doc(Bytes.from_string(s))) +why = look(d, "error.message") Bool.pick(Ev, String.eq(s, "[DONE]"), EEnd{}, Bool.pick(Ev, String.is_empty(why), ev.text(look(d, "choices.0.delta.content")), EFail{ErrApi{200, why}})) Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.is_empty https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=from_string https://jend.leeeet.dev/definition.txt?path=bend-kit-llm@0.13.0.1/llm.bend&name=Err https://jend.leeeet.dev/definition.txt?path=bend-kit-llm@0.13.0.1/llm.bend&name=Ev https://jend.leeeet.dev/definition.txt?path=bend-kit-llm@0.13.0.1/llm.bend&name=doc https://jend.leeeet.dev/definition.txt?path=bend-kit-llm@0.13.0.1/llm.bend&name=ev.doc https://jend.leeeet.dev/definition.txt?path=bend-kit-llm@0.13.0.1/llm.bend&name=ev.text https://jend.leeeet.dev/definition.txt?path=bend-kit-llm@0.13.0.1/llm.bend&name=look