text-generation-webui/extensions/superboogav2/utils.py

18 lines
502 B
Python
Raw Normal View History

2023-09-26 20:30:19 -04:00
"""
This module contains common functions across multiple other modules.
"""
import extensions.superboogav2.parameters as parameters
2023-09-26 20:30:19 -04:00
# Create the context using the prefix + data_separator + postfix from parameters.
def create_context_text(results):
context = parameters.get_prefix() + parameters.get_data_separator().join(results) + parameters.get_postfix()
return context
# Create metadata with the specified source
def create_metadata_source(source: str):
return {'source': source}