Module: OllamaChat::Information::UserAgent
- Defined in:
- lib/ollama_chat/information.rb
Overview
A module that provides user agent functionality for identifying the application.
This module encapsulates methods for determining the application name and constructing a standardized user agent string that includes the application name and version. It is designed to be included in classes that need to provide identification information for HTTP requests or other communications.
Instance Method Summary collapse
-
#progname ⇒ String
The progname method returns the name of the application.
-
#user_agent ⇒ String
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.
Instance Method Details
#progname ⇒ String
The progname method returns the name of the application.
44 45 46 |
# File 'lib/ollama_chat/information.rb', line 44 def progname 'ollama_chat' end |
#user_agent ⇒ String
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.
53 54 55 |
# File 'lib/ollama_chat/information.rb', line 53 def user_agent [ progname, OllamaChat::VERSION ] * ?/ end |