Liking cljdoc? Tell your friends :D

qy-upup.banana-prompts.core


extract-prompt-idclj

(extract-prompt-id url)

Extracts the prompt ID from a Banana Prompts URL.

Args: url (string): The Banana Prompts URL.

Returns: string: The prompt ID, or nil if the URL is invalid.

Example: (extract-prompt-id "https://bananaproai.com/banana-prompts/another-great-prompt") ;=> "another-great-prompt"

(extract-prompt-id "not-a-valid-url") ;=> nil

Extracts the prompt ID from a Banana Prompts URL.

Args:
  url (string): The Banana Prompts URL.

Returns:
  string: The prompt ID, or nil if the URL is invalid.

Example:
  (extract-prompt-id "https://bananaproai.com/banana-prompts/another-great-prompt")
  ;=> "another-great-prompt"

  (extract-prompt-id "not-a-valid-url")
  ;=> nil
raw docstring

generate-prompt-urlclj

(generate-prompt-url prompt-id)

Generates a Banana Prompts URL based on the prompt ID.

Args: prompt-id (string): The unique identifier for the prompt.

Returns: string: The complete URL for the Banana Prompt.

Example: (generate-prompt-url "my-awesome-prompt") ;=> "https://bananaproai.com/banana-prompts/my-awesome-prompt"

Generates a Banana Prompts URL based on the prompt ID.

Args:
  prompt-id (string): The unique identifier for the prompt.

Returns:
  string: The complete URL for the Banana Prompt.

Example:
  (generate-prompt-url "my-awesome-prompt")
  ;=> "https://bananaproai.com/banana-prompts/my-awesome-prompt"
raw docstring

mock-prompt-dataclj

(mock-prompt-data prompt-id)
(mock-prompt-data prompt-id description example-inputs)

Generates mock prompt data for testing purposes.

Args: prompt-id (string): The ID of the prompt. description (string, optional): A description of the prompt. Defaults to "A sample prompt description.". example-inputs (vector, optional): Example inputs for the prompt. Defaults to ["input1" "input2"].

Returns: map: A map representing the mock prompt data.

Example: (mock-prompt-data "test-prompt" "A custom description" ["inputA" "inputB" "inputC"]) ;=> {:id "test-prompt", :description "A custom description", :example_inputs ["inputA" "inputB" "inputC"]}

Generates mock prompt data for testing purposes.

Args:
  prompt-id (string): The ID of the prompt.
  description (string, optional): A description of the prompt.  Defaults to "A sample prompt description.".
  example-inputs (vector, optional): Example inputs for the prompt. Defaults to ["input1" "input2"].

Returns:
  map: A map representing the mock prompt data.

Example:
  (mock-prompt-data "test-prompt" "A custom description" ["inputA" "inputB" "inputC"])
  ;=> {:id "test-prompt", :description "A custom description", :example_inputs ["inputA" "inputB" "inputC"]}
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close