-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmix.exs
More file actions
142 lines (132 loc) · 3.76 KB
/
mix.exs
File metadata and controls
142 lines (132 loc) · 3.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
unless Code.ensure_loaded?(DependencySources) do
Code.require_file("build_support/dependency_sources.exs", __DIR__)
end
defmodule LlamaCppSdk.MixProject do
use Mix.Project
@version "0.1.0"
@source_url "https://github.com/nshkrdotcom/llama_cpp_sdk"
@homepage_url "https://hex.pm/packages/llama_cpp_sdk"
def project do
[
app: :llama_cpp_sdk,
name: "LlamaCppSdk",
version: @version,
elixir: "~> 1.18",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
description: description(),
deps: deps(),
docs: docs(),
dialyzer: dialyzer(),
package: package(),
source_url: @source_url,
homepage_url: @homepage_url
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
def application do
[
extra_applications: [:logger, :inets, :ssl],
mod: {LlamaCppSdk.Application, []}
]
end
defp deps do
[
DependencySources.dep(:self_hosted_inference_core, __DIR__),
DependencySources.dep(:execution_plane, __DIR__),
DependencySources.dep(:execution_plane_process, __DIR__),
{:ex_doc, "~> 0.40", only: :dev, runtime: false},
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.4", only: :dev, runtime: false}
]
end
defp description do
"""
First concrete self-hosted inference backend for llama.cpp, owning
llama-server boot specs, readiness probes, stop semantics, and endpoint
publication through self_hosted_inference_core.
"""
end
defp docs do
[
main: "overview",
name: "LlamaCppSdk",
source_ref: "v#{@version}",
source_url: @source_url,
homepage_url: @homepage_url,
logo: "assets/llama_cpp_sdk.svg",
assets: %{"assets" => "assets"},
extras: [
"README.md": [title: "Overview", filename: "overview"],
"guides/architecture.md": [title: "Architecture"],
"guides/boot_spec.md": [title: "Boot Spec"],
"guides/readiness_and_health.md": [title: "Readiness And Health"],
"guides/integration_with_self_hosted_inference_core.md": [title: "Kernel Integration"],
"examples/README.md": [title: "Examples", filename: "examples"],
"CHANGELOG.md": [title: "Changelog"],
LICENSE: [title: "License"]
],
groups_for_extras: [
"Project Overview": [
"README.md",
"guides/architecture.md",
"guides/boot_spec.md",
"guides/readiness_and_health.md",
"guides/integration_with_self_hosted_inference_core.md"
],
Examples: [
"examples/README.md"
],
"Project Reference": [
"CHANGELOG.md",
"LICENSE.md"
]
],
groups_for_modules: [
"Public API": [
LlamaCppSdk,
LlamaCppSdk.BootSpec
],
"Backend Runtime": [
LlamaCppSdk.Backend,
LlamaCppSdk.CommandBuilder
],
"Runtime Semantics": [
LlamaCppSdk.Probes,
LlamaCppSdk.StopStrategy
]
]
]
end
defp package do
[
licenses: ["MIT"],
links: %{
"GitHub" => @source_url,
"Changelog" => "#{@source_url}/blob/main/CHANGELOG.md",
"Hex" => @homepage_url,
"HexDocs" => "https://hexdocs.pm/llama_cpp_sdk"
},
files: [
"lib",
"build_support",
"assets/*.svg",
".formatter.exs",
"mix.exs",
"README.md",
"CHANGELOG.md",
"LICENSE",
"AGENTS.md"
]
]
end
defp dialyzer do
[
plt_add_apps: [:mix, :ex_unit],
plt_core_path: "priv/plts/core",
plt_local_path: "priv/plts",
flags: [:error_handling, :underspecs]
]
end
end