Kaynağa Gözat

[TG-125] Fix Ollama model namespace to llama3.2-vision:11b

Lange François 1 ay önce
ebeveyn
işleme
24ad2b9c06
3 değiştirilmiş dosya ile 5 ekleme ve 5 silme
  1. 2 2
      app.py
  2. 1 1
      generate_docs.py
  3. 2 2
      scripts/manage_models.sh

+ 2 - 2
app.py

@@ -685,7 +685,7 @@ with tab_explore:
                                 minimal_records = df_display[['product_name', 'Medical Warning']].head(10).to_dict('records')
                                 eval_prompt = f"The user has this profile: {profile_text}. Evaluate these top foods and state which are highly recommended or strictly forbidden: {minimal_records}. Provide a direct, readable clinical summary. Do not output raw JSON."
                                 try:
-                                    response = ollama.chat(model='llama3.2:11b', messages=[{'role': 'user', 'content': eval_prompt}], stream=True)
+                                    response = ollama.chat(model='llama3.2-vision:11b', messages=[{'role': 'user', 'content': eval_prompt}], stream=True)
                                     st.write_stream(chunk['message']['content'] for chunk in response)
                                 except Exception as e:
                                     error_msg = str(e).lower()
@@ -946,7 +946,7 @@ with tab_planner:
             # Stream the response instantly!
             try:
                 start_llm = time.time()
-                response = ollama.chat(model='llama3.2:11b', messages=[
+                response = ollama.chat(model='llama3.2-vision:11b', messages=[
                     {'role': 'system', 'content': sys_prompt},
                     {'role': 'user', 'content': 'Generate my meal plan as a markdown table.'}
                 ], stream=True)

+ 1 - 1
generate_docs.py

@@ -536,7 +536,7 @@ Run these test cases to verify the installation:
 | :--- | :--- | :--- | :---: |
 | **TC-OP-01** | Search 'Cheese' on Search Tab | 10+ records returned in <0.04s. Listeria warning flags on unpasteurized. | `[ ]` |
 | **TC-OP-02** | Enter '1.5 cups' in Plate Tab | Parsed and converted to metric grams based on density index. | `[ ]` |
-| **TC-OP-03** | Ask Chat: 'Can I eat sushi?' | Qwen2.5:1.5b retrieves database context and flags raw fish as forbidden for pregnancy. | `[ ]` |
+| **TC-OP-03** | Ask Chat: 'Can I eat sushi?' | llama3.2-vision:11b retrieves database context and flags raw fish as forbidden for pregnancy. | `[ ]` |
 | **TC-OP-04** | Trigger manual db backup | Timestamped compressed .sql.gz created inside backups/ folder. | `[ ]` |
 | **TC-OP-05** | Terminate Ollama Container | Zabbix PROBLEM active alert generated on dashboard in < 30 seconds. | `[ ]` |
 """

+ 2 - 2
scripts/manage_models.sh

@@ -1,8 +1,8 @@
 #!/bin/bash
 #ident "@(#)$Format:LocalFoodAI:manage_models.sh:%an:%ae:%ad:%cn:%ce:%cd:%H:%D:%N$"
 
-echo "Pulling the new efficient billion-parameter model (llama3.2:11b)..."
-docker exec food-ollama-1 ollama pull llama3.2:11b
+echo "Pulling the new efficient billion-parameter model (llama3.2-vision:11b)..."
+docker exec food-ollama-1 ollama pull llama3.2-vision:11b
 
 echo "Cleaning up unused models to free up disk space..."
 docker exec food-ollama-1 ollama rm qwen2.5:7b