auth = dmda.DomoTokenAuth(
    domo_access_token=os.environ["DOMO_ACCESS_TOKEN"],
    domo_instance=os.environ["DOMO_INSTANCE"],
)

source

llm_generate_text

 llm_generate_text (text_input, auth:domolibrary.client.DomoAuth.DomoAuth,
                    chat_body:dict=None, debug_api:bool=False,
                    parent_class:str=None, debug_num_stacks_to_drop=1,
                    return_raw:bool=False, session:httpx.AsyncClient=None)

source

generate_chat_body

 generate_chat_body (text_input:str, model='domo.domo_ai.domogpt-chat-
                     medium-v1.1:anthropic')
(await llm_generate_text(text_input="why is the sky blue", auth=auth)).response['output']
"The sky appears blue due to a phenomenon called Rayleigh scattering. Here's a simplified explanation:\n\n1. Sunlight contains all colors of the visible spectrum.\n\n2. As sunlight enters Earth's atmosphere, it collides with gas molecules and other particles.\n\n3. These collisions cause the light to scatter in all directions.\n\n4. Blue light has a shorter wavelength and higher frequency than other colors in the visible spectrum.\n\n5. Because of its shorter wavelength, blue light is scattered more easily and efficiently than other colors.\n\n6. This scattered blue light reaches our eyes from all directions, making the sky appear blue.\n\n7. At sunrise and sunset, the light travels through more of the atmosphere, scattering the blue light away. This allows more red and orange light to reach our eyes, creating the colorful skies we see at those times.\n\nIt's worth noting that the sky isn't always blue. Factors like pollution, dust, and water vapor can affect the color we perceive. Additionally, other planets may have different atmospheric compositions, resulting in different colored skies."

summarize text


source

llm_summarize_text

 llm_summarize_text (text_input:str,
                     auth:domolibrary.client.DomoAuth.DomoAuth,
                     system_prompt:str=None, summary_length:int=100, outpu
                     t_style:__main__.OutputStyleEnum=<OutputStyleEnum.BUL
                     LETED: 'BULLETED'>, summary_body:dict=None,
                     return_raw:bool=False, debug_api:bool=False,
                     debug_num_stacks_to_drop=1,
                     session:httpx.AsyncClient=None,
                     parent_class:str=None)

source

generate_summarize_body

 generate_summarize_body (text_input:str, summary_length:int=100,
                          output_style:str='BULLETED',
                          system_prompt:str='You are a helpful assistant
                          that writes concise summaries',
                          model='domo.domo_ai.domogpt-
                          summarize-v1:anthropic')

source

OutputStyleEnum

 OutputStyleEnum (value, names=None, module=None, qualname=None,
                  type=None, start=1)

An enumeration.

(await llm_summarize_text(
    "it is 50 degrees in seoul.  we decided to run for the hills.  curiously the windchill is relatively low",
    auth = auth
)).response['output']
'- Temperature in Seoul is 50 degrees.\n- The group decided to go to the hills.\n- The windchill is relatively low.'