Skip to content

Commit

Permalink
docs(examples): unifies example doc links to point to example dirs (#538
Browse files Browse the repository at this point in the history
)

Signed-off-by: AngeloDanducci <angelo.danducci.ii@ibm.com>
  • Loading branch information
AngeloDanducci authored Mar 8, 2025
1 parent 65abb91 commit e5dd2e3
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 43 deletions.
5 changes: 1 addition & 4 deletions python/docs/agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,4 @@ _Source: [examples/workflows/multi_agents.py](/python/examples/workflows/multi_a

## Examples

- [simple.py](/python/examples/agents/simple.py) - Basic agent implementation
- [react.py](/python/examples/agents/react.py) - More complete implementation
- [granite.py](/python/examples/agents/granite.py) - Using Granite model
- [agents.ipynb](/python/examples/notebooks/agents.ipynb) - Interactive notebook examples
- All agent examples can be found in [here](/python/examples/agents).
12 changes: 1 addition & 11 deletions python/docs/cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,14 +200,4 @@ _Source: /examples/cache/custom.py_

## Examples

- [unconstrainedCache.py](/python/examples/cache/unconstrainedCache.py) - Basic usage of unconstrained cache
- [unconstrainedCacheFunction.py](/python/examples/cache/unconstrainedCacheFunction.py) - Caching function output and intermediate steps
- [slidingCache.py](/python/examples/cache/slidingCache.py) - Size-limited cache implementation
- [fileCache.py](/python/examples/cache/fileCache.py) - Persistent disk-based caching
- [fileCacheCustomProvider.py](/python/examples/cache/fileCacheCustomProvider.py) - Custom provider for file cache
- [llmCache.py](/python/examples/cache/llmCache.py) - Caching LLM responses
- [toolCache.py](/python/examples/cache/toolCache.py) - Caching tool execution results
- [decoratorCache.py](/python/examples/cache/decoratorCache.py) - Using the cache decorator
- [decoratorCacheComplex.py](/python/examples/cache/decoratorCacheComplex.py) - Advanced decorator caching with custom key functions
- [cacheFn.py](/python/examples/cache/cacheFn.py) - Function wrapping for dynamic caching
- [custom.py](/python/examples/cache/custom.py) - Creating a custom cache provider
- All cache examples can be found in [here](/python/examples/cache).
6 changes: 1 addition & 5 deletions python/docs/emitter.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,4 @@ _Source: [examples/emitter/advanced.py](/python/examples/emitter/advanced.py)_

## Examples

- [base.py](/python/examples/emitter/base.py) - Basic emitter implementation
- [matchers.py](/python/examples/emitter/matchers.py) - Event matching techniques
- [piping.py](/python/examples/emitter/piping.py) - Event piping strategies
- [agentMatchers.py](/python/examples/emitter/agentMatchers.py) - Agent event handling
- [advanced.py](/python/examples/emitter/advanced.py) - Advanced configuration
- All emitter examples can be found in [here](/python/examples/emitter).
5 changes: 5 additions & 0 deletions python/docs/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,8 @@ message: str = FrameworkError.ensure(error).explain()
```

See the source file [errors.py](python/beeai_framework/errors.py) for additional methods.


## Examples

- All error examples can be found in [here](/python/examples/errors).
3 changes: 1 addition & 2 deletions python/docs/logger.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,5 +162,4 @@ _Source: /examples/logger/agent.py_

## Examples

- [base.py](/python/examples/logger/base.py) - Simple example showing log levels
- [agent.py](/python/examples/logger/agent.py) - Simple example showing agent integration
- All logger examples can be found in [here](/python/examples/logger).
6 changes: 1 addition & 5 deletions python/docs/memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -526,8 +526,4 @@ _Source: [/python/examples/memory/custom.py](/python/examples/memory/custom.py)_

## Examples

- [unconstrained_memory.py](/examples/memory/unconstrained_memory.py) - Basic memory usage
- [sliding_memory.py](/examples/memory/sliding_memory.py) - Sliding window memory example
- [token_memory.py](/examples/memory/token_memory.py) - Token-based memory management
- [summarize_memory.py](/examples/memory/summarize_memory.py) - Summarization memory example
- [agent_memory.py](/examples/memory/agent_memory.py) - Using memory with agents
- All memory examples can be found in [here](/python/examples/memory).
6 changes: 1 addition & 5 deletions python/docs/serialization.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,4 @@ _Source: [examples/serialization/context.py](/python/examples/serialization/cont

## Examples

- [base.py](/python/examples/serialization/base.py) - Base example
- [memory.py](/python/examples/serialization/memory.py) - Example of serializing and deserializing memory components
- [customExternal.py](/python/examples/serialization/customExternal.py) - Registering external classes with the serializer
- [customInternal.py](/python/examples/serialization/customInternal.py) - Implementing the Serializable interface
- [context.py](/python/examples/serialization/context.py) - Using serialization context for advanced scenarios
- All serialization examples can be found in [here](/python/examples/serialization).
9 changes: 3 additions & 6 deletions python/docs/templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,9 +369,6 @@ _Source: [examples/templates/system_prompt.py](/examples/templates/system_prompt

# Examples

- [basic_template.py](/python/examples/templates/basic_template.py) - Simple variable substitution with Pydantic validation
- [functions.py](/python/examples/templates/functions.py) - Adding dynamic content with custom template functions
- [objects.py](/python/examples/templates/objects.py) - Handle complex nested data structures in templates with proper type validation
- [arrays.py](/python/examples/templates/arrays.py) - Process collections of data within templates for dynamic list generation
- [forking.py](/python/examples/templates/forking.py) - Create new templates based on existing ones, with customizations
- [system_prompt.py](/python/examples/templates/system_prompt.py) - Creating specialized system prompts for AI assistants with tool definitions
## Examples

- All template examples can be found in [here](/python/examples/templates).
4 changes: 4 additions & 0 deletions python/docs/tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -650,3 +650,7 @@ to recover from errors.

When building tools, consider that the tool is being invoked by a somewhat unpredictable third party (the agent). You should ensure that sufficient guardrails are in place to prevent
adverse outcomes.

## Examples

- All tool examples can be found in [here](/python/examples/tools).
6 changes: 1 addition & 5 deletions python/docs/workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,4 @@ This pattern demonstrates:

## Examples

- [simple.py](/python/examples/workflows/simple.py) - Basic workflow example
- [nesting.py](/python/examples/workflows/nesting.py) - More complex workflow with loops
- [memory.py](/python/examples/workflows/memory.py) - Using memory in workflows
- [multi_agents.py](/python/examples/workflows/multi_agents.py) - Multi-agent workflow
- [workflows.ipynb](/python/examples/notebooks/workflows.ipynb) - Interactive notebook examples
- All workflow examples can be found in [here](/python/examples/workflows).

0 comments on commit e5dd2e3

Please sign in to comment.