-
Notifications
You must be signed in to change notification settings - Fork 75
/
mix.exs
143 lines (135 loc) · 3.83 KB
/
mix.exs
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
143
defmodule LangChain.MixProject do
use Mix.Project
@source_url "https://github.com/brainlid/langchain"
@version "0.3.0-rc.1"
def project do
[
app: :langchain,
version: @version,
elixir: "~> 1.14",
elixirc_paths: elixirc_paths(Mix.env()),
test_options: [docs: true],
start_permanent: Mix.env() == :prod,
deps: deps(),
package: package(),
docs: &docs/0,
name: "LangChain",
homepage_url: @source_url,
description: """
Elixir implementation of a LangChain style framework.
"""
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:ecto, "~> 3.10 or ~> 3.11"},
{:gettext, "~> 0.20"},
{:req, ">= 0.5.2"},
{:abacus, "~> 2.1.0"},
{:nx, ">= 0.7.0", optional: true},
{:ex_doc, "~> 0.34", only: :dev, runtime: false},
{:mimic, "~> 1.8", only: :test}
]
end
defp docs do
[
main: "readme",
source_ref: "v#{@version}",
source_url: @source_url,
assets: %{"notebooks/files" => "files"},
skip_undefined_reference_warnings_on: ["CHANGELOG.md"],
logo: "images/elixir-langchain-link-logo_32px.png",
extra_section: "Guides",
extras: extras(),
groups_for_extras: [
Notebooks: Path.wildcard("notebooks/*.livemd")
],
groups_for_modules: [
"Chat Models": [
LangChain.ChatModels.ChatOpenAI,
LangChain.ChatModels.ChatAnthropic,
LangChain.ChatModels.ChatBumblebee,
LangChain.ChatModels.ChatGoogleAI,
LangChain.ChatModels.ChatVertexAI,
LangChain.ChatModels.ChatMistralAI,
LangChain.ChatModels.ChatOllamaAI,
LangChain.ChatModels.ChatModel
],
Chains: [
LangChain.Chains.LLMChain,
LangChain.Chains.TextToTitleChain,
LangChain.Chains.SummarizeConversationChain,
LangChain.Chains.DataExtractionChain
],
Messages: [
LangChain.Message,
LangChain.MessageDelta,
LangChain.Message.ContentPart,
LangChain.Message.ToolCall,
LangChain.Message.ToolResult,
LangChain.PromptTemplate,
LangChain.MessageProcessors,
LangChain.MessageProcessors.JsonProcessor,
LangChain.TokenUsage
],
Functions: [
LangChain.Function,
LangChain.FunctionParam
],
Callbacks: [
LangChain.Callbacks,
LangChain.ChatModels.LLMCallbacks,
LangChain.Chains.ChainCallbacks
],
Routing: [
LangChain.Chains.RoutingChain,
LangChain.Routing.PromptRoute
],
Images: [
LangChain.Images,
LangChain.Images.OpenAIImage,
LangChain.Images.GeneratedImage
],
Tools: [
LangChain.Tools.Calculator
],
Utils: [
LangChain.Utils,
LangChain.Utils.BedrockConfig,
LangChain.Utils.ChatTemplates,
LangChain.Utils.ChainResult,
LangChain.Config,
LangChain.Gettext
]
]
]
end
defp extras do
[
"README.md",
"CHANGELOG.md",
"notebooks/getting_started.livemd",
"notebooks/custom_functions.livemd",
"notebooks/context-specific-image-descriptions.livemd"
]
end
defp package do
# Note: the Livebook notebooks and related files are not included in the
# package.
[
files: ["lib", "mix.exs", "README*", "LICENSE*"],
maintainers: ["Mark Ericksen"],
licenses: ["Apache-2.0"],
links: %{"GitHub" => @source_url}
]
end
end