From 574f3f42c459557dce933640c83a508c8418c5d8 Mon Sep 17 00:00:00 2001 From: soulteary Date: Mon, 29 May 2023 14:21:58 +0800 Subject: [PATCH] chore: github hot project api, allow use streaming --- components/stream-responser/stream_builder.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/stream-responser/stream_builder.go b/components/stream-responser/stream_builder.go index 3779ac6..26d488b 100644 --- a/components/stream-responser/stream_builder.go +++ b/components/stream-responser/stream_builder.go @@ -5,6 +5,7 @@ import ( eb "github.com/soulteary/sparrow/components/event-broker" FlagStudio "github.com/soulteary/sparrow/connectors/flag-studio" + GitHubTop "github.com/soulteary/sparrow/connectors/github-top" OpenaiAPI "github.com/soulteary/sparrow/connectors/openai-api" "github.com/soulteary/sparrow/internal/datatypes" "github.com/soulteary/sparrow/internal/define" @@ -52,6 +53,11 @@ func StreamBuilder(parentMessageID string, conversationID string, modelSlug stri sequences = MakeStreamingMessage(input, modelSlug, conversationID, messageID, mode) quickMode = true } + case datatypes.MODEL_GITHUB_TOP.Slug: + if define.ENABLE_GITHUB_TOP { + sequences = MakeStreamingMessage(GitHubTop.HandleUserPrompt(input), modelSlug, conversationID, messageID, mode) + quickMode = true + } // case datatypes.MODEL_NO_MODELS.Slug: // default: }