Open vedant-sanil opened 4 months ago
Hello Vendant I can try to fix the error, can you please provide more info so I can re create it? What is your initial query?
Hi Alejandro, appreciate your quick response. Here is the query I was trying: What tests are needed to diagnose Chronic Neutropenia?
Some more info: I was using the following architecture_path
, prompts/PubMed/Architecture_1/master.json
. And the model as I mentioned was GPT-3.5-Turbo
.
And here is the error: Error code: 400 - {'error': {'message': "This model's maximum context length is 16385 tokens. However, your messages resulted in 24204 tokens. Please reduce the length of the messages.", 'type': 'invalid_request_error', 'param': 'messages', 'code': 'context_length_exceeded'}}
Thanks on it!
@vedant-sanil Can you provide more context on how you are initializing clinfo.ai? (share code) are you changing anything? I am testing it right now and can't reproduce the error
For instance this is what I get when I submit your question:
`synthesis Literature Summary: Studies on chronic neutropenia in children have highlighted various diagnostic approaches. De Alarcon et al. utilized bone marrow aspiration, biopsy, steroid stimulation, and in vitro assays to categorize patients, finding that a normal bone marrow response to steroids indicated a benign course, while CFU-GM and CSA assays helped classify neutropenia. Antineutrophil antibody quantification in children with chronic neutropenia may aid in understanding the clinical course, as demonstrated by Kobayashi et al. In autoimmune neutropenia of infancy, Lalezari et al. emphasized the importance of immunologic tests for diagnosis. Bux et al. found associations between reduced CFU-GM, circulating hematopoietic progenitors, and severe infections in pediatric patients with anti-neutrophil antibodies. Dale and Welte reviewed chronic idiopathic neutropenia (CIN) and autoimmune neutropenia (AIN), suggesting G-CSF treatment for increasing neutrophils in symptomatic cases. While these studies provide valuable insights, the evidence is limited by small sample sizes, potential selection bias, and the retrospective nature of some studies.
TL;DR: Diagnostic tests for chronic neutropenia in children may include bone marrow evaluation, steroid stimulation, antineutrophil antibody quantification, and immunologic tests, with potential treatment implications, but the evidence is limited by study design and sample sizes.
References:
Here is the code I am using to initialize the model:
PROMPS_PATH = '<clinfoai_path>/prompts/PubMed/Architecture_1/master.json'
question = "What tests are needed to diagnose Chronic Neutropenia?"
clinfo = ClinfoAI(llm="gpt-3.5-turbo",
openai_key=<OPENAI_API_KEY>,
email=<email>,
architecture_path=PROMPS_PATH)
answer = clinfo.forward(question=question)
Hi,
I am using GPT-3.5-Turbo for the Clinfo API, but I run into a "context length exceeded" error from OpenAI for some queries. Is it possible to control the size of the context being used for these queries?