Hi!
I would greatly appreciate any insights on this issue.
I’m attempting to utilize a markdown.md file as a knowledge source within a crew that is currently in a flow.
The entire environment is local, and I’m working with Ollama.
The knowledge file is located in a folder named [knowledge], which resides in the same directory as main.py.
Knowledge integration works seamlessly in a single .py crew, in that I can also successfully use a .md file.
Here is the Error:
[ERROR]: Failed to upsert documents: APIStatusError.__init__() missing 2 required keyword-only arguments: 'response' and 'body'
[WARNING]: Failed to init knowledge: APIStatusError.__init__() missing 2 required keyword-only arguments: 'response' and 'body'
Versions:
Crewai: 0.100.1
crewai-tools: 0.33.0
Python 3.12.8
Using Ollama only, local llms i have tried. deepseekR1:7b, llama3.2:3b. others
Different temps.
The above gives a slightly Different Error:
Failed to upsert documents: APIStatusError.init() missing 2 required keyword-only arguments: ‘response’ and ‘body’
tried updating:
pip Install --upgrade crewai crewai-tools transformers tokenizers docling docling-core
from crewai.knowledge.source.crew_docling_source import CrewDoclingSource
from crewai.knowledge.source.text_file_knowledge_source import TextFileKnowledgeSource
Anyone have any examples of a fow: crew.py with Knowledge, CrewDoclingSource and markdown.md with just ollama?
** Is this a flow problem?
Possible Solution - None, I think the sub library just needs to be fixed
This can also mean that embedding are not being generated and saved in chroma. Put the logger (below code) when you run crew code blog and observe the logs. You might see 429 status code somewhere.
429 status code is related to API overloaded issue in case of OpenAI and Azure OpenAI. Although you said you are using some other model using Ollama wrapper. So I am not sure how helpful it would be for you. Nonetheless if you are getting APIStatusError.init() missing 2 required keyword-only arguments: ‘response’ and ‘body’ type of error, it indicates that embeddings are not formed and saved in Chroma DB.
Why don’t you try with open source models such as Huggingface or Gemini or Groq. That way you will know whether you have model specific error or it something else. My suggestion is, that you experiment with smaller data file for now. All the best
Fixed the issue.
went back to single py file “crew.py”
running just crew.py (kept agents.yaml and tasks.py in config folder)
added this to the bottom of the crew.py
news_input = get_news_input()
poem_crew_instance = PoemCrew() # Create an instance of PoemCrew
crew_object = poem_crew_instance.crew() # Call the crew() method to get a Crew object
result = crew_object.kickoff(inputs=news_input) # Now call kickoff()
print(result)
and everything works great!! ollama, gemini, groq… etc
Hope this helps someone who is stuck!
Never Give Up!
I have it working now! CrewDoclingSource Markdown File Knowledge File Ollama using Knowledge md file Update a knowledge markdown file using Obsidian, Knowledge file outside of the script directory for a crew
Here is the code for the community! hope this helps someone