You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Modify starting code (which doesn't originally work), to:
from dotenv import load_dotenv
import os
import sys
load_dotenv()
if not os.getenv("OPENAI_API_KEY"):
sys.exit("Error: OPENAI_API_KEY not found in environment variables")
from swarms import Agent
from swarm_models import OllamaModel
model = OllamaModel(model_name="llama3.1:8b")
from datetime import datetime
from swarms import Agent, AgentRearrange, create_file_in_folder
Run model
Expected behavior
Output with Response only, not other details. Expected identical output to OpenAI 4o / 4o-mini model output.
Screenshots
Agent Name: Chief Medical Officer
Output: model='llama3.1:8b' created_at='2025-02-08T13:52:57.1776161Z' done=True done_reason='stop' total_duration=8675541900 load_duration=21295700 prompt_eval_count=261 prompt_eval_duration=305000000 eval_count=563 eval_duration=8347000000 response="Initial Assessment ( Timestamp: 2025-02-09 00:52:48.499230)\n\n* Patient Information: 45-year-old White Male\n* Lab Results:\n\t+ eGFR (estimated Glomerular Filtration Rate): 59 mL/min/1.73m^2 (mildly reduced)\n\t+ Non-African American ethnicity (no specific lab values provided)\n\nInitial ICD-10 Codes for Symptoms:\n\n* R31.9: Other specified renal symptoms\n* Z91.19: Other specified risk factors\n\nPreliminary Assessment:\n\nBased on the patient's age, sex, and mildly reduced eGFR, potential differential diagnoses may include chronic kidney disease (CKD), mild renal impairment, or early stages of diabetic nephropathy. However, without additional lab results, further investigation is necessary.\n\nDifferential Diagnoses:\n\n1. Chronic Kidney Disease (CKD) (N18.4)\n\t* eGFR 60-89 mL/min/1.73m^2\n\t* Additional lab values to consider:\n\t\t+ Serum creatinine\n\t\t+ Urine protein-to-creatinine ratio (UPCR)\n2. Diabetic Nephropathy (E11.9)\n\t* HbA1c levels, urine albumin-to-creatinine ratio (UACR), and eGFR can help support this diagnosis\n3. Mild Renal Impairment (R31.9)\n\t* May be indicated by a mildly reduced eGFR (59 mL/min/1.73m^2)\n4. Other specified renal symptoms (R31.9)\n\t* Could include conditions like hydronephrosis, pyelonephritis, or interstitial nephritis\n\nSpecialist Consultations Needed:\n\n* Nephrologist for further evaluation and management of CKD\n* Endocrinologist for assessment of diabetic nephropathy\n* Urologist for investigation of potential urinary tract issues (e.g., hydronephrosis)\n\nRecommended Next Steps:\n\n1. Request additional lab results, including serum creatinine, HbA1c levels, urine protein-to-creatinine ratio (UPCR), and urine albumin-to-creatinine ratio (UACR).\n2. Consult the nephrologist for further evaluation and management of CKD.\n3. Schedule an appointment with the endocrinologist to assess diabetic nephropathy.\n4. Consider referring the patient to a urologist for investigation of potential urinary tract issues.\n\nPlease let me know if you'd like to proceed with these recommendations or if you have any questions." context=[128006, 882, 128007, 271, 2374, 25, ............................... THIS CONTEXT GOES ON TO BE A 12MB file
Separate minor related issues:
Bug within the demo code.
When setting the model to a local one, the Agent still requires OPENAI_API_KEY
The text was updated successfully, but these errors were encountered:
To Reproduce
Steps to reproduce the behavior:
from dotenv import load_dotenv
import os
import sys
load_dotenv()
if not os.getenv("OPENAI_API_KEY"):
sys.exit("Error: OPENAI_API_KEY not found in environment variables")
from swarms import Agent
from swarm_models import OllamaModel
model = OllamaModel(model_name="llama3.1:8b")
from datetime import datetime
from swarms import Agent, AgentRearrange, create_file_in_folder
Expected behavior
Output with Response only, not other details. Expected identical output to OpenAI 4o / 4o-mini model output.
Screenshots
Agent Name: Chief Medical Officer
Output: model='llama3.1:8b' created_at='2025-02-08T13:52:57.1776161Z' done=True done_reason='stop' total_duration=8675541900 load_duration=21295700 prompt_eval_count=261 prompt_eval_duration=305000000 eval_count=563 eval_duration=8347000000 response="Initial Assessment ( Timestamp: 2025-02-09 00:52:48.499230)\n\n* Patient Information: 45-year-old White Male\n* Lab Results:\n\t+ eGFR (estimated Glomerular Filtration Rate): 59 mL/min/1.73m^2 (mildly reduced)\n\t+ Non-African American ethnicity (no specific lab values provided)\n\nInitial ICD-10 Codes for Symptoms:\n\n* R31.9: Other specified renal symptoms\n* Z91.19: Other specified risk factors\n\nPreliminary Assessment:\n\nBased on the patient's age, sex, and mildly reduced eGFR, potential differential diagnoses may include chronic kidney disease (CKD), mild renal impairment, or early stages of diabetic nephropathy. However, without additional lab results, further investigation is necessary.\n\nDifferential Diagnoses:\n\n1. Chronic Kidney Disease (CKD) (N18.4)\n\t* eGFR 60-89 mL/min/1.73m^2\n\t* Additional lab values to consider:\n\t\t+ Serum creatinine\n\t\t+ Urine protein-to-creatinine ratio (UPCR)\n2. Diabetic Nephropathy (E11.9)\n\t* HbA1c levels, urine albumin-to-creatinine ratio (UACR), and eGFR can help support this diagnosis\n3. Mild Renal Impairment (R31.9)\n\t* May be indicated by a mildly reduced eGFR (59 mL/min/1.73m^2)\n4. Other specified renal symptoms (R31.9)\n\t* Could include conditions like hydronephrosis, pyelonephritis, or interstitial nephritis\n\nSpecialist Consultations Needed:\n\n* Nephrologist for further evaluation and management of CKD\n* Endocrinologist for assessment of diabetic nephropathy\n* Urologist for investigation of potential urinary tract issues (e.g., hydronephrosis)\n\nRecommended Next Steps:\n\n1. Request additional lab results, including serum creatinine, HbA1c levels, urine protein-to-creatinine ratio (UPCR), and urine albumin-to-creatinine ratio (UACR).\n2. Consult the nephrologist for further evaluation and management of CKD.\n3. Schedule an appointment with the endocrinologist to assess diabetic nephropathy.\n4. Consider referring the patient to a urologist for investigation of potential urinary tract issues.\n\nPlease let me know if you'd like to proceed with these recommendations or if you have any questions." context=[128006, 882, 128007, 271, 2374, 25, ............................... THIS CONTEXT GOES ON TO BE A 12MB file
Separate minor related issues:
Bug within the demo code.
When setting the model to a local one, the Agent still requires OPENAI_API_KEY
The text was updated successfully, but these errors were encountered: