File tree 9 files changed +33
-21
lines changed
9 files changed +33
-21
lines changed Original file line number Diff line number Diff line change 16
16
17
17
let innerText = ' ' ;
18
18
$: {
19
+ if (typeof text !== ' string' ) {
20
+ text = ` ${ JSON .stringify (text)} ` ;
21
+ }
19
22
const markedText = ! rawText ? replaceNewLine (marked (replaceMarkdown (text || ' ' ))? .toString ()) : marked (text || ' ' )? .toString ();
20
23
if (!! markedText && markedText .endsWith (' <br>' )) {
21
24
const idx = markedText .lastIndexOf (' <br>' );
Original file line number Diff line number Diff line change 33
33
* @property {string } provider
34
34
* @property {string } model
35
35
* @property {string? } [template_name]
36
+ * @property {string? } [user_name]
36
37
* @property {string } user_message
37
38
* @property {string? } [system_instruction]
38
39
* @property {string } completion_text
Original file line number Diff line number Diff line change 95
95
padding : 10px 5px ;
96
96
97
97
.instruction-log-message {
98
+ margin-top : 10px ;
98
99
overflow-y : auto ;
99
100
max-height : 350px ;
100
101
scrollbar-width : none ;
Original file line number Diff line number Diff line change 374
374
</div>
375
375
</CardBody>
376
376
{#if showStateSearch}
377
- <CardBody class="border-bottom" style="display: flex; justify-content: flex-end;">
378
- <StateSearch bind:states={states} onSearch={q => handleStateSearch(q)}/>
377
+ <CardBody class="border-bottom">
378
+ <Row class="g-3 justify-content-end">
379
+ <Col lg="6">
380
+ <StateSearch bind:states={states} onSearch={q => handleStateSearch(q)}/>
381
+ </Col>
382
+ </Row>
379
383
</CardBody>
380
384
{/if}
381
385
<CardBody class="border-bottom">
Original file line number Diff line number Diff line change 36
36
>
37
37
{#each states as state , idx }
38
38
<div class =" state-search-item" >
39
- <div >
39
+ <div style = " flex: 1; " >
40
40
<RemoteSearchInput
41
41
bind:value ={state .key }
42
42
maxLength ={maxLength }
43
43
onSearch ={e => onSearch (e )}
44
44
placeholder =" Search States"
45
45
/>
46
46
</div >
47
- <div >
47
+ <div style = " flex: 1; " >
48
48
<Input
49
49
type =" text"
50
50
bind:value ={state .value }
67
67
</div >
68
68
{/each }
69
69
{#if states .length < limit }
70
- <div >
71
- <Button
72
- color =" link"
73
- style =" padding-left: 0px;"
74
- on:click ={() => addState ()}
75
- >
76
- Add +
77
- </Button >
78
- </div >
70
+ <div class =" d-flex justify-content-end" >
71
+ <Button
72
+ color =" link"
73
+ style =" padding-left: 0px;"
74
+ on:click ={() => addState ()}
75
+ >
76
+ Add +
77
+ </Button >
78
+ <div style =" flex: 0 0 13px;" ></div >
79
+ </div >
79
80
{/if }
80
81
</div >
81
82
Original file line number Diff line number Diff line change 201
201
202
202
203
203
< HeadTitle title= " {$_('Instruction Log')}" / >
204
- < Breadcrumb pagetitle= " {$_('Instruction Log')}" title= " {$_('Instruction')}" / >
204
+ < Breadcrumb pagetitle= " {$_('Log')}" title= " {$_('Instruction')}" / >
205
205
< LoadingToComplete isLoading= {isLoading} / >
206
206
207
207
< Row>
260
260
< thead>
261
261
< tr>
262
262
< th scope= " col" class = " instruction-log-col ellipsis" > {$_ (' Agent' )}< / th>
263
- < th scope= " col" class = " instruction-log-col ellipsis" > {$_ (' Provider' )}< / th>
264
- < th scope= " col" class = " instruction-log-col ellipsis" > {$_ (' Model' )}< / th>
263
+ < th scope= " col" class = " instruction-log-col ellipsis" > {$_ (' Llm Provider' )}< / th>
264
+ < th scope= " col" class = " instruction-log-col ellipsis" > {$_ (' Llm Model' )}< / th>
265
265
< th scope= " col" class = " instruction-log-col ellipsis" > {$_ (' Template' )}< / th>
266
+ < th scope= " col" class = " instruction-log-col ellipsis" > {$_ (' Caller' )}< / th>
266
267
< th scope= " col" class = " instruction-log-col ellipsis" > {$_ (' Created Time' )}< / th>
267
268
< th scope= " col" > {$_ (' ' )}< / th>
268
269
< / tr>
Original file line number Diff line number Diff line change 20
20
<td class ="instruction-log-col ellipsis" >{item .provider }</td >
21
21
<td class ="instruction-log-col ellipsis" >{item .model }</td >
22
22
<td class ="instruction-log-col ellipsis" >{item .template_name || ' N/A' }</td >
23
+ <td class ="instruction-log-col ellipsis" >{item .user_name || ' N/A' }</td >
23
24
<td class ="instruction-log-col ellipsis" >{utcToLocal (item .created_time )}</td >
24
25
<td >
25
26
<ul class =" list-unstyled hstack gap-1 mb-0" style =" justify-content: center;" >
Original file line number Diff line number Diff line change 8
8
import HeadTitle from ' $lib/common/HeadTitle.svelte' ;
9
9
import Breadcrumb from ' $lib/common/Breadcrumb.svelte' ;
10
10
import Markdown from ' $lib/common/markdown/Markdown.svelte' ;
11
- import InstructionState from ' ./instruction-components/instruction-state.svelte' ;
11
+ import InstructionState from ' .. /instruction-components/instruction-state.svelte' ;
12
12
import { getAgents } from ' $lib/services/agent-service' ;
13
13
import LoadingToComplete from ' $lib/common/LoadingToComplete.svelte' ;
14
14
import { sendChatCompletion } from ' $lib/services/instruct-service' ;
15
15
import { getLlmConfigs } from ' $lib/services/llm-provider-service' ;
16
16
import { LlmModelType } from ' $lib/helpers/enums' ;
17
17
import NavBar from ' $lib/common/nav-bar/NavBar.svelte' ;
18
18
import NavItem from ' $lib/common/nav-bar/NavItem.svelte' ;
19
- import InstructionTemplate from ' ./instruction-components/instruction-template.svelte' ;
20
- import InstructionLlm from ' ./instruction-components/instruction-llm.svelte' ;
19
+ import InstructionTemplate from ' .. /instruction-components/instruction-template.svelte' ;
20
+ import InstructionLlm from ' .. /instruction-components/instruction-llm.svelte' ;
21
21
22
22
const maxLength = 64000 ;
23
23
const DEFAULT_PROVIDER = ' openai' ;
165
165
< / script>
166
166
167
167
< HeadTitle title= " {$_('Instruction')}" / >
168
- < Breadcrumb pagetitle= " {$_('Instruction ')}" title= " {$_('Instruction')}" / >
168
+ < Breadcrumb pagetitle= " {$_('Testing ')}" title= " {$_('Instruction')}" / >
169
169
< LoadingToComplete isLoading= {isLoading} / >
170
170
171
171
< div class = " d-xl-flex" >
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ const config = {
52
52
"/page/agent/[agentId]" ,
53
53
"/page/agent/[agentId]/build" ,
54
54
"/page/agent/[agentId]/train" ,
55
- "/page/instruction" ,
55
+ "/page/instruction/testing " ,
56
56
"/page/instruction/log" ,
57
57
"/page/conversation" ,
58
58
"/page/conversation/[conversationId]" ,
You can’t perform that action at this time.
0 commit comments