Troubleshooting
This guide covers common issues you might encounter when working with Kedi.
Installation Issues
Package Not Found
Solution: Ensure you're using Python 3.10 or higher:
Missing Dependencies
Solution: Install with all dependencies:
Runtime Errors
LLM Configuration Missing
Solution: Set your API key:
Type Validation Failed
Solution: Ensure your procedure return type matches:
# Wrong: LLM returns string by default
@get_count() -> int:
Give me a [number]. # May return "5" as string
# Correct: Kedi will coerce to int if valid
@get_count() -> int:
Give me a [number] as digits only.
Syntax Errors
Unclosed Bracket/Angle
Solution: Use escape sequences for literal brackets:
Missing Line Continuation
Solution: Use \ for multi-line prompts:
# Wrong: Two LLM calls
@example() -> str:
Line one
Line two with [answer]
= <answer>
# Correct: One LLM call
@example() -> str:
Line one \
Line two with [answer]
= <answer>
Common Mistakes
Output Field as Instruction
Wrong Pattern
Correct Pattern
Forgetting Return Statement
# Wrong: No return
@greet(name: str) -> str:
Hello, <name>!
# Correct: With return
@greet(name: str) -> str:
Hello [greeting] to <name>!
= <greeting>
Debug Tips
Verbose Mode
Run with debug output:
Print Intermediate Values
@debug_example(x: str) -> str:
Step 1: [step1]
```python
print("Step 1 result:", <step1>)
\```
Step 2 using <step1>: [step2]
= <step2>
Getting Help
- GitHub Issues: Report bugs
- Documentation: Check the concepts section
- Examples: See the examples for working code