Skip to content

Commit

Permalink
remove nonsense function (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmacia authored Oct 14, 2024
1 parent 55951ee commit a06ac6b
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions lib/llm_composer.ex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule LlmComposer do
@moduledoc """
`LlmComposer` is responsible for interacting with a language model to perform chat-related operations,
such as running completions and executing functions based on the responses. The module provides
such as running completions and executing functions based on the responses. The module provides
functionality to handle user messages, generate responses, and automatically execute functions as needed.
## Example Usage
Expand Down Expand Up @@ -62,7 +62,7 @@ defmodule LlmComposer do
"""
@spec simple_chat(Settings.t(), String.t()) :: Helpers.action_result()
def simple_chat(%Settings{} = settings, msg) do
messages = get_messages(settings, msg, [], %{})
messages = [Message.new(:user, user_prompt(settings, msg, %{}))]

run_completion(settings, messages)
end
Expand Down Expand Up @@ -106,11 +106,6 @@ defmodule LlmComposer do
end)
end

@spec get_messages(Settings.t(), String.t(), messages(), map()) :: messages()
defp get_messages(settings, current_message, old_messages, opts) do
old_messages ++ [Message.new(:user, user_prompt(settings, current_message, opts))]
end

@spec user_prompt(Settings.t(), String.t(), map()) :: String.t()
defp user_prompt(settings, message, opts) do
prompt = Map.get(opts, :user_prompt_prefix, settings.user_prompt_prefix)
Expand Down

0 comments on commit a06ac6b

Please sign in to comment.