File tree Expand file tree Collapse file tree 2 files changed +545
-0
lines changed
examples/chatbots/typescript/src Expand file tree Collapse file tree 2 files changed +545
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,10 @@ import { ChatSession } from "./chat_session.js";
3
3
import { LLMClient } from "./llm_client.js" ;
4
4
import { StdioServer } from "./server_clients/stdio_server.js" ;
5
5
import { LambdaFunctionClient } from "./server_clients/lambda_function.js" ;
6
+ import {
7
+ InteractiveOAuthClient ,
8
+ InteractiveOAuthConfig ,
9
+ } from "./server_clients/interactive_oauth.js" ;
6
10
import { Server } from "./server_clients/server.js" ;
7
11
import logger from "./logger.js" ;
8
12
@@ -29,6 +33,15 @@ async function main(): Promise<void> {
29
33
) ;
30
34
}
31
35
36
+ // Initialize interactive OAuth servers
37
+ for ( const [ name , srvConfig ] of Object . entries (
38
+ serverConfig . oAuthServers || { }
39
+ ) ) {
40
+ servers . push (
41
+ new InteractiveOAuthClient ( name , srvConfig as InteractiveOAuthConfig )
42
+ ) ;
43
+ }
44
+
32
45
const llmClient = new LLMClient ( config . bedrockClient , config . modelId ) ;
33
46
const chatSession = new ChatSession ( servers , llmClient ) ;
34
47
You can’t perform that action at this time.
0 commit comments