PSOpenAI.Format.ps1xml

<?xml version="1.0" encoding="utf-8"?>
<Configuration>
  <ViewDefinitions>
    <View>
      <Name>PSOpenAI.Batch</Name>
      <ViewSelectedBy>
        <TypeName>PSOpenAI.Batch</TypeName>
      </ViewSelectedBy>
      <TableControl>
        <TableHeaders>
          <TableColumnHeader>
            <Label>Id</Label>
            <Width>30</Width>
            <Alignment>Left</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>endpoint</Label>
            <Width>22</Width>
            <Alignment>Left</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>Count</Label>
            <Width>6</Width>
            <Alignment>Right</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>Status</Label>
            <Width>12</Width>
            <Alignment>Left</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>created_at</Label>
            <Width>22</Width>
            <Alignment>Right</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>completed_at</Label>
            <Width>22</Width>
            <Alignment>Right</Alignment>
          </TableColumnHeader>
        </TableHeaders>
        <TableRowEntries>
          <TableRowEntry>
            <Wrap />
            <TableColumnItems>
              <TableColumnItem>
                <PropertyName>id</PropertyName>
              </TableColumnItem>
              <TableColumnItem>
                <PropertyName>endpoint</PropertyName>
              </TableColumnItem>
              <TableColumnItem>
                <ScriptBlock>
                  $_.request_counts.total
                </ScriptBlock>
              </TableColumnItem>
              <TableColumnItem>
                <PropertyName>status</PropertyName>
              </TableColumnItem>
              <TableColumnItem>
                <PropertyName>created_at</PropertyName>
              </TableColumnItem>
              <TableColumnItem>
                <PropertyName>completed_at</PropertyName>
              </TableColumnItem>
            </TableColumnItems>
          </TableRowEntry>
        </TableRowEntries>
      </TableControl>
    </View>
    <View>
      <Name>PSOpenAI.Response</Name>
      <ViewSelectedBy>
        <TypeName>PSOpenAI.Response</TypeName>
      </ViewSelectedBy>
      <ListControl>
        <ListEntries>
          <ListEntry>
            <ListItems>
              <ListItem>
                <PropertyName>id</PropertyName>
              </ListItem>
              <ListItem>
                <PropertyName>object</PropertyName>
              </ListItem>
              <ListItem>
                <PropertyName>created_at</PropertyName>
              </ListItem>
              <ListItem>
                <PropertyName>status</PropertyName>
              </ListItem>
              <ListItem>
                <PropertyName>error</PropertyName>
                <ItemSelectionCondition>
                  <ScriptBlock>$null -ne $_.error</ScriptBlock>
                </ItemSelectionCondition>
              </ListItem>
              <ListItem>
                <PropertyName>incomplete_details</PropertyName>
                <ItemSelectionCondition>
                  <ScriptBlock>$null -ne $_.incomplete_details</ScriptBlock>
                </ItemSelectionCondition>
              </ListItem>
              <ListItem>
                <Label>usage</Label>
                <ScriptBlock>$_.usage | select input_tokens, output_tokens, total_tokens</ScriptBlock>
              </ListItem>
              <ListItem>
                <PropertyName>user</PropertyName>
                <ItemSelectionCondition>
                  <ScriptBlock>$null -ne $_.user</ScriptBlock>
                </ItemSelectionCondition>
              </ListItem>
              <ListItem>
                <PropertyName>metadata</PropertyName>
                <ItemSelectionCondition>
                  <ScriptBlock>$_.metadata.Keys.Count -gt 0</ScriptBlock>
                </ItemSelectionCondition>
              </ListItem>
              <ListItem>
                <PropertyName>model</PropertyName>
              </ListItem>
              <ListItem>
                <PropertyName>instructions</PropertyName>
              </ListItem>
              <ListItem>
                <Label>output</Label>
                <ScriptBlock>$_.Output.type</ScriptBlock>
              </ListItem>
              <ListItem>
                <PropertyName>LastUserMessage</PropertyName>
              </ListItem>
              <ListItem>
                <PropertyName>output_text</PropertyName>
              </ListItem>
              <ListItem>
                <PropertyName>StructuredOutputs</PropertyName>
                <ItemSelectionCondition>
                  <ScriptBlock>$_.StructuredOutputs.Count -gt 0</ScriptBlock>
                </ItemSelectionCondition>
              </ListItem>
              <ListItem>
                <Label>History</Label>
                <ScriptBlock>$_.History.type</ScriptBlock>
                <ItemSelectionCondition>
                  <ScriptBlock>$_.History.Count -gt 0</ScriptBlock>
                </ItemSelectionCondition>
              </ListItem>
              <ListItem>
                <PropertyName>previous_response_id</PropertyName>
              </ListItem>
            </ListItems>
          </ListEntry>
        </ListEntries>
      </ListControl>
    </View>
    <View>
      <Name>PSOpenAI.Response.Message</Name>
      <ViewSelectedBy>
        <TypeName>PSOpenAI.Response.Message</TypeName>
      </ViewSelectedBy>
      <TableControl>
        <TableHeaders>
          <TableColumnHeader>
            <Label>Type</Label>
            <Width>16</Width>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>Role</Label>
            <Width>12</Width>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>Id</Label>
            <Width>16</Width>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>Content</Label>
            <Width>48</Width>
          </TableColumnHeader>
        </TableHeaders>
        <TableRowEntries>
          <TableRowEntry>
            <TableColumnItems>
              <TableColumnItem>
                <PropertyName>type</PropertyName>
              </TableColumnItem>
              <TableColumnItem>
                <PropertyName>role</PropertyName>
              </TableColumnItem>
              <TableColumnItem>
                <PropertyName>id</PropertyName>
              </TableColumnItem>
              <TableColumnItem>
                <PropertyName>content</PropertyName>
              </TableColumnItem>
            </TableColumnItems>
          </TableRowEntry>
        </TableRowEntries>
      </TableControl>
    </View>
  </ViewDefinitions>
</Configuration>