Module: OllamaChat::Information::UserAgent

Defined in:
lib/ollama_chat/information.rb

Instance Method Summary collapse

Instance Method Details

#prognameString

The progname method returns the name of the application.

Returns:

  • (String)

    the application name “ollama_chat”



13
14
15
# File 'lib/ollama_chat/information.rb', line 13

def progname
  'ollama_chat'
end

#user_agentString

The user_agent method constructs and returns a user agent string that combines the program name and the OllamaChat version separated by a forward slash.

Returns:

  • (String)

    the formatted user agent string



22
23
24
# File 'lib/ollama_chat/information.rb', line 22

def user_agent
  [ progname, OllamaChat::VERSION ] * ?/
end