AnishMachamasi / Building-a-Generative-AI-chatbot-using-Amazon-Bedrock

3 stars 5 forks source link

User Queries via API Gateway: #3

Open ssakthi-etr opened 4 months ago

ssakthi-etr commented 4 months ago

Could you explain with steps to test the API using API Gateway. what should i provide in headers and body?
I have upload EMR on EKS AWS knowledge base document in s3 bucket. my user query for testing is { "question": "How to Describe a virtual cluster?" }

I am having hard time in making this work.

I am using below models.

def create_langchain_vector_embedding_using_bedrock(bedrock_client): bedrock_embeddings_client = BedrockEmbeddings( client=bedrock_client, model_id="amazon.Titan Embeddings G1 - Text") return bedrock_embeddings_client

def create_bedrock_llm(bedrock_client): bedrock_llm = Bedrock( model_id="Meta.Llama 3 8B Instruct", client=bedrock_client, model_kwargs={'temperature': 0.5, 'maxTokens':8191, "topP":0.8} ) return bedrock_llm