Skip to content

[Question]: How do I add a custom endpoint? #2130

Closed Answered by jerowe
jerowe asked this question in Q&A
Discussion options

You must be logged in to vote

Hello!

So I haven't been able to figure out the streaming response, but since I don't need to stream it doesn't really matter to me. (Personally. I'm sure its great and matters to others!)

Flask App

from flask import Flask, Response
from flask import stream_with_context, request
# from flask_sse import sse

import boto3
import pprint
from botocore.client import Config
from langchain.llms.bedrock import Bedrock
from langchain.retrievers.bedrock import AmazonKnowledgeBasesRetriever
from langchain.prompts import PromptTemplate
from langchain.chains import ConversationChain
from langchain.memory import ConversationBufferMemory
from langchain_community.chat_models import BedrockChat
from langc…

Replies: 5 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@danny-avila
Comment options

@jerowe
Comment options

Comment options

You must be logged in to vote
1 reply
@danny-avila
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@danny-avila
Comment options

Answer selected by danny-avila
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants
Converted from issue

This discussion was converted from issue #2129 on March 18, 2024 15:34.