refactor: message content (#1424)
This commit is contained in:
@@ -78,7 +78,10 @@ function Suggestion:suggest()
|
||||
local history_messages = {
|
||||
{
|
||||
role = "user",
|
||||
content = [[
|
||||
content = {
|
||||
{
|
||||
type = "text",
|
||||
text = [[
|
||||
<filepath>a.py</filepath>
|
||||
<code>
|
||||
L1: def fib
|
||||
@@ -87,7 +90,9 @@ L3: if __name__ == "__main__":
|
||||
L4: # just pass
|
||||
L5: pass
|
||||
</code>
|
||||
]],
|
||||
]],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
role = "assistant",
|
||||
@@ -95,7 +100,12 @@ L5: pass
|
||||
},
|
||||
{
|
||||
role = "user",
|
||||
content = '<question>{"insertSpaces":true,"tabSize":4,"indentSize":4,"position":{"row":1,"col":7}}</question>',
|
||||
content = {
|
||||
{
|
||||
type = "text",
|
||||
text = '<question>{"insertSpaces":true,"tabSize":4,"indentSize":4,"position":{"row":1,"col":7}}</question>',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
role = "assistant",
|
||||
@@ -126,7 +136,7 @@ L5: pass
|
||||
},
|
||||
]
|
||||
]
|
||||
]],
|
||||
]],
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user