{"id":50236237,"url":"https://github.com/x2d7/interlude","last_synced_at":"2026-06-01T03:06:01.971Z","repository":{"id":339472531,"uuid":"1129190265","full_name":"x2d7/interlude","owner":"x2d7","description":"Stream-first LLM library for Go","archived":false,"fork":false,"pushed_at":"2026-03-10T22:57:23.000Z","size":162,"stargazers_count":3,"open_issues_count":6,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-26T19:36:30.919Z","etag":null,"topics":["ai","go","golang","llm","streaming","tool-calling"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/x2d7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-06T18:27:03.000Z","updated_at":"2026-03-10T22:40:57.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/x2d7/interlude","commit_stats":null,"previous_names":["x2d7/interlude"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/x2d7/interlude","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x2d7%2Finterlude","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x2d7%2Finterlude/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x2d7%2Finterlude/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x2d7%2Finterlude/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/x2d7","download_url":"https://codeload.github.com/x2d7/interlude/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x2d7%2Finterlude/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33757791,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-01T02:00:06.963Z","response_time":115,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","go","golang","llm","streaming","tool-calling"],"created_at":"2026-05-26T19:35:32.951Z","updated_at":"2026-06-01T03:06:01.954Z","avatar_url":"https://github.com/x2d7.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# interlude\n\nGo library for streaming LLM interactions with tool calling support.\n\nHandles streaming, multi-step tool calls, and user approval flows — so you don't have to.\n\n## Install\n\n```bash\ngo get github.com/x2d7/interlude\n```\n\n## Quick Start\n\nSee [examples/](examples/) for usage examples.\n\n```go\nclient := openai.OpenAIClient{\n    Endpoint: \"https://openrouter.ai/api/v1\",\n    APIKey:   os.Getenv(\"API_KEY\"),\n    Model:    \"gpt-4o\",\n}\n\nc := chat.Chat{\n    Messages: chat.NewMessages(),\n}\n\nfor event := range c.SendUserStream(ctx, \u0026client, \"Hello!\") {\n    switch v := event.(type) {\n    case chat.EventToken:\n        fmt.Print(v.Content)\n    case chat.EventError:\n        log.Fatal(v.Error)\n    }\n}\n```\n\n## Tool Calling\n\n```go\ntoolList := tools.NewTools()\n\ntool, _ := tools.NewTool(\"get_weather\", \"Returns weather for a city\", func(input struct {\n    City string `json:\"city\"`\n}) (string, error) {\n    return \"Sunny, 22°C\", nil\n})\n\ntoolList.Add(tool)\n\nc := chat.Chat{\n    Messages: chat.NewMessages(),\n    Tools:    toolList,\n}\n\nfor event := range c.SendUserStream(ctx, \u0026client, \"What's the weather in Berlin?\") {\n    switch v := event.(type) {\n    case chat.EventToken:\n        fmt.Print(v.Content)\n    case chat.EventToolCall:\n        v.Resolve(true) // approve the call\n    case chat.EventCompletionEnded:\n        fmt.Println()\n    }\n}\n```\n\nTool input schema is generated automatically from your struct using `jsonschema` tags.\n\n## Providers\n\n- OpenAI-compatible APIs (OpenAI, OpenRouter, etc.)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fx2d7%2Finterlude","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fx2d7%2Finterlude","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fx2d7%2Finterlude/lists"}