basic chat system now works (checkpoint)
This commit is contained in:
parent
8333672683
commit
6881ff5601
@ -310,7 +310,10 @@ class ChatSessionService extends DtpService {
|
||||
* Gets all turns for a chat session.
|
||||
*/
|
||||
async getTurns(chatSessionId: GadgetId): Promise<any[]> {
|
||||
const turns = await ChatTurn.find({ session: chatSessionId })
|
||||
const turns = await ChatTurn.find({
|
||||
session: chatSessionId,
|
||||
status: { $ne: ChatTurnStatus.Processing },
|
||||
})
|
||||
.populate("user", "-passwordSalt -password")
|
||||
.populate("project")
|
||||
.populate("provider", "-models")
|
||||
|
||||
@ -117,9 +117,8 @@ class AiService extends GadgetService {
|
||||
this.log.info("calling provider to process chat", {
|
||||
provider: config.name,
|
||||
sdk: config.sdk,
|
||||
haveStreamCallback: !!streamCallback,
|
||||
model,
|
||||
options,
|
||||
haveStreamCallback: !!streamCallback,
|
||||
});
|
||||
const api = this.getApi(config);
|
||||
const modelConfig: IAiModelConfig = { ...model, provider: config };
|
||||
|
||||
Loading…
Reference in New Issue
Block a user