Skip to content

Commit d9dbc20

Browse files
authored
feat: initialize projectInstructions variable in conversation prepara… (#104)
1 parent 37218d9 commit d9dbc20

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

internal/api/chat/create_conversation_message_stream_v2.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ func (s *ChatServerV2) prepare(ctx context.Context, projectId string, conversati
195195
}
196196

197197
var latexFullSource string
198+
var projectInstructions string = ""
198199
switch conversationType {
199200
case chatv2.ConversationType_CONVERSATION_TYPE_DEBUG:
200201
latexFullSource = "latex_full_source is not available in debug mode"
@@ -207,6 +208,8 @@ func (s *ChatServerV2) prepare(ctx context.Context, projectId string, conversati
207208
if err != nil {
208209
return ctx, nil, nil, err
209210
}
211+
212+
projectInstructions = project.Instructions
210213
}
211214

212215
var conversation *models.Conversation
@@ -217,7 +220,7 @@ func (s *ChatServerV2) prepare(ctx context.Context, projectId string, conversati
217220
actor.ID,
218221
projectId,
219222
latexFullSource,
220-
project.Instructions,
223+
projectInstructions,
221224
userInstructions,
222225
userMessage,
223226
userSelectedText,

0 commit comments

Comments
 (0)