Skip to content
TheChatArchiveThe Chat Archive
gpt-3.5-turbo-0613· OpenAIHugging Face Arena Human Preference 55K

How don't see a empty col in web2py

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Hugging Facezephyr-7b-beta’s answer.
  1. User

    How don't see a empty col in web2py

  2. Assistant

    To hide an empty column in web2py, you can use the is_empty attribute in the Field definition. Here is an example:

    db.define_table('mytable',
        Field('myfield1'),
        Field('myfield2', 'integer', is_empty=lambda v: v is None or v == ''),
        Field('myfield3'),
    )
    

    In this example, the myfield2 column will be hidden if its value is None or an empty string.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.