Lazer is a Python library that provides a convenient way to expose Python functions as schemas for OpenAI chat models.
To install Lazer, simply run:
pip install lazer| * { | |
| box-sizing: border-box; | |
| } | |
| body { | |
| margin: 0 auto; | |
| padding: 1em 1.5em; | |
| min-height: 100vh; | |
| max-width: 800px; | |
| min-width: auto; |
| 116 | 854 | |
|---|---|---|
| 81 | 793 | |
| 42 | 777 | |
| 33 | 830 | |
| 36 | 826 | |
| 49 | 874 | |
| 85 | 892 | |
| 74 | 852 | |
| 96 | 846 | |
| 99 | 819 |
| Traceback (most recent call last): | |
| File "/home/diamond/Scripts/acmcsufdev/christmas-py-example/.venv/lib/python3.11/site-packages/websockets/legacy/protocol.py", line 963, in transfer_data | |
| message = await self.read_message() | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| File "/home/diamond/Scripts/acmcsufdev/christmas-py-example/.venv/lib/python3.11/site-packages/websockets/legacy/protocol.py", line 1033, in read_message | |
| frame = await self.read_data_frame(max_size=self.max_size) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| File "/home/diamond/Scripts/acmcsufdev/christmas-py-example/.venv/lib/python3.11/site-packages/websockets/legacy/protocol.py", line 1108, in read_data_frame | |
| frame = await self.read_frame(max_size) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| { pkgs ? import <nixpkgs> {} }: | |
| pkgs.mkShell { | |
| buildInputs = with pkgs; [ git ]; | |
| } |
| directive @requiredCapabilities( | |
| requiredCapabilities: [String!] | |
| ) on ARGUMENT_DEFINITION | ENUM | ENUM_VALUE | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION | |
| """ | |
| Marks an element of a GraphQL schema as only available via a preview header | |
| """ | |
| directive @preview( | |
| """ | |
| The identifier of the API preview that toggles this field. |
| #!/usr/bin/env python3 | |
| import itertools | |
| def dfa2sat(E: list[tuple[int, int, str]], q: int, F: list[int]): | |
| """ | |
| Convert DFA to SAT. | |
| Arguments: | |
| - E: list of edges (source, target, label) |
| { config, lib, pkgs, ... }: | |
| let | |
| user = "diamondburned"; | |
| go-get-html = pkgs.writeTextFile { | |
| name = "libdb.so-go-get"; | |
| text = '' | |
| <!DOCTYPE html> | |
| {{ $path := .OriginalReq.URL.Path }} | |
| {{ $name := $path | splitList "/" | rest | first }} |
| package ordmap | |
| import ( | |
| "bytes" | |
| "encoding/json" | |
| "fmt" | |
| "log" | |
| "strings" | |
| ) |
| atod.asm: _atod.c | |
| gcc -Wall -Os -s -c ./_atod.c | |
| objconv -fnasm _atod.o | |
| # Sanitize the output. | |
| dos2unix _atod.asm | |
| sed -i \ | |
| -e 's/;.*$$//' \ | |
| -e 's/\.\(LC[0-9]*\)/\1/g' \ | |
| -e 's/^default rel//g' \ | |
| -e 's/^SECTION \(\.\w*\).*$$/section \1/g' \ |