Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Ollama local models spamming non-"response" details. #771

Open
avetise opened this issue Feb 8, 2025 · 3 comments
Open

[BUG] Ollama local models spamming non-"response" details. #771

avetise opened this issue Feb 8, 2025 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@avetise
Copy link

avetise commented Feb 8, 2025

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'https://github.com/kyegomez/swarms/blob/fb494267ebb4a0af95b3b0683a89f3fd4ca80320/examples/ollama_demo.py'
  2. 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

  1. 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

@avetise avetise added the bug Something isn't working label Feb 8, 2025
Copy link

github-actions bot commented Feb 8, 2025

Hello there, thank you for opening an Issue ! 🙏🏻 The team was notified and they will get back to you asap.

@harshalmore31
Copy link
Collaborator

@avetise I tried to reproduce this issue and tested twice, I can't find any problems, do you still have problems ??

@avetise
Copy link
Author

avetise commented Feb 14, 2025

Have you changed the starting code to the above to get it working? Has there been an update to the ollama related examples?

Image

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants