kompfner
ca29f62bff
Merge pull request #2510 from pipecat-ai/pk/fix-set-tools-types
...
Update types for tools in `LLMSetToolsFrame` and `LLMContextAggregato…
2025-08-26 14:12:21 -04:00
Aleix Conchillo Flaqué
0dced68c3c
Merge pull request #2511 from pipecat-ai/aleix/end-of-pipline-warning
...
PipelineTask: warn if CancelFrame doesn't reach the end
2025-08-26 11:02:26 -07:00
Aleix Conchillo Flaqué
8ab81d289a
PipelineTask: warn if CancelFrame doesn't reach the end
2025-08-26 10:36:33 -07:00
Paul Kompfner
f457d00760
Update types for tools in LLMSetToolsFrame and LLMContextAggregator.set_tools(), for two reason:
...
1. `ToolsSchema` has been supported in `LLMSetToolsFrame` for a while but wasn't properly reflected in these type hints
2. The new universal `LLMContext` expects tools to be either a `ToolsSchema` or `NOT_GIVEN`.
2025-08-26 11:32:21 -04:00
kompfner
f5118c4412
Merge pull request #2440 from pipecat-ai/pk/prototype-llm-failover-attempt-4
...
Support for runtime LLM switching
2025-08-26 09:55:03 -04:00
Paul Kompfner
a79fe40162
Fix a typo in the CHANGELOG
2025-08-26 09:51:48 -04:00
Paul Kompfner
dcb4949e20
Move ServiceSwitcherFrame and ManuallySwitchServiceFrame to frames.py
2025-08-26 09:47:37 -04:00
Paul Kompfner
8b543e558d
Add CHANGELOG entry describing LLMService.run_inference()
2025-08-26 09:47:32 -04:00
Paul Kompfner
8181962236
Add CHANGELOG entry describing LLM switcher
2025-08-26 09:46:51 -04:00
Paul Kompfner
98dc891640
Move CHANGELOG log entry from 0.0.81 to Unreleased
2025-08-26 09:45:49 -04:00
Paul Kompfner
71de0da570
ServiceSwitchers are now controlled using frames rather than with direct method calls
2025-08-26 09:44:15 -04:00
Paul Kompfner
b40c8bb81d
Refactor LLMSwitcher into a base ServiceSwitcher and an LLMSwitcher that subclasses it
2025-08-26 09:44:15 -04:00
Paul Kompfner
43f1b59b86
Convert LLM generate_summary() methods to the more generic run_inference()
2025-08-26 09:44:15 -04:00
Paul Kompfner
a0a2bb3aa4
In GeminiLLMAdapter, when translating from the universal LLMContext format, only pull out the first "system" message as the system instruction, and convert subsequent ones into "user" messages. This is a more correct thing to do than simply drop subsequent "system" messages, especially when potentially sharing a context between multiple LLMs.
2025-08-26 09:44:15 -04:00
Paul Kompfner
04a50df3d5
Add LLMSwitcher, with LLMSwitcherStrategyManual as the first supported switching strategy
2025-08-26 09:44:15 -04:00
Paul Kompfner
8c0edffaff
Fix bug in AWS Bedrock conversation summarization. It was using an out-of-date pattern (the _client property no longer exists)
2025-08-26 09:44:15 -04:00
Paul Kompfner
fe6063fdbe
Introduce an affordance to LLMService for generating a summary of a conversation directly (i.e. without going through the pipeline).
...
This abstraction will allow us to update Pipecat Flows to avoid reaching into LLM service internals to generate summaries.
In addition to being a helpful refactor to remove a fragile part of Pipecat Flows, this change helps set the stage for supporting the upcoming `LLMSwitcher`, where the “active” LLM will only be determined at runtime—today, Pipecat Flows needs to know ahead of time what type of LLM it’s working with, to load an LLM-specific “adapter” that does the work of generating summaries, among other things.
2025-08-26 09:44:15 -04:00
Paul Kompfner
195146adb2
Bump deprecation warning version, as this commit is not expected to ship until version 0.0.82.
2025-08-26 09:44:15 -04:00
Paul Kompfner
cab9e18cc9
Port recent change to LLMAssistantContextAggregator to universal LLMAssistantAggregator
2025-08-26 09:44:15 -04:00
Paul Kompfner
baef688e4e
Port recent changes to LLMUserContextAggregator to universal LLMUserAggregator
2025-08-26 09:44:15 -04:00
Paul Kompfner
f1f43fe500
After a rebase, rename foundational examples showing usage of universal context to avoid naming conflict with a recently-added example.
2025-08-26 09:44:15 -04:00
Paul Kompfner
73b63f8d35
Remove unnecessary import
2025-08-26 09:44:15 -04:00
Paul Kompfner
0c14b33e92
Deprecate GoogleLLMOpenAIBetaService
2025-08-26 09:44:15 -04:00
Paul Kompfner
09beaccaf0
Assorted minor improvements after code review
2025-08-26 09:44:15 -04:00
Paul Kompfner
40557a1aae
Remove TODO comment
2025-08-26 09:44:15 -04:00
Paul Kompfner
ecc4cc4a79
Add support for universal LLMContext to RTVIObserver
2025-08-26 09:44:15 -04:00
Paul Kompfner
37be8805f4
ruff
2025-08-26 09:44:15 -04:00
Paul Kompfner
93c7e64995
Add missing PERPLEXITY_API_KEY in env.example
2025-08-26 09:44:15 -04:00
Paul Kompfner
9de2bd61a9
Add supports_universal_context for OpenAILLMService subclasses so that we can gradually roll out support for universal LLMContext in a controlled manner.
...
Also update `get_chat_completions()` implementations with the new argument type.
2025-08-26 09:44:15 -04:00
Paul Kompfner
566af71862
Add CHANGELOG entry for the universal LLMContext machinery
2025-08-26 09:44:15 -04:00
Paul Kompfner
12064bd6e6
Add a bit of helpful info in an error message
2025-08-26 09:44:15 -04:00
Paul Kompfner
a962459151
Change LLMContextAggregatorPair.create(context) to LLMContextAggregatorPair(context)
2025-08-26 09:44:15 -04:00
Paul Kompfner
8fc76a29bc
Raise errors when trying to use universal LLMContext with LLM services that don't yet support it
2025-08-26 09:44:15 -04:00
Paul Kompfner
e3019261a5
Fix classes that subclass BaseLLMAdapter by adding placeholder stuff until support for universal LLMContext machinery comes to all LLM services
2025-08-26 09:44:15 -04:00
Paul Kompfner
fa1f6f1c51
In LLMContext, normalize an empty provided ToolsSchema to NOT_GIVEN
2025-08-26 09:44:15 -04:00
Paul Kompfner
337f00c16c
Minor fix: add a type annotation
2025-08-26 09:44:15 -04:00
Paul Kompfner
d50922cdcd
Update Google adapter to handle possibility of system message in standard format being provided as a list of text parts rather than just a string.
2025-08-26 09:44:15 -04:00
Paul Kompfner
47f5ca6265
Update Gemini adapter to be able to handle LLMSpecificMessages containing Google-formatted messages
2025-08-26 09:44:15 -04:00
Paul Kompfner
2eddb6ffda
[WIP] Universal (LLM-agnostic) context machinery to support runtime LLM switching.
...
- Remove outdated comment
2025-08-26 09:44:15 -04:00
Paul Kompfner
560a6f2247
[WIP] Universal (LLM-agnostic) context machinery to support runtime LLM switching.
...
- Make `LLMContext.add_audio_frames_message()` respect the OpenAI standard format
2025-08-26 09:44:15 -04:00
Paul Kompfner
59ecb19000
[WIP] Universal (LLM-agnostic) context machinery to support runtime LLM switching.
...
- Add support for LLM-specific messages in the universal `LLMContext`, to enable using LLM-specific functionality while still using the universal LLM context
2025-08-26 09:44:15 -04:00
Paul Kompfner
cfb094b3c8
[WIP] Universal (LLM-agnostic) context machinery to support runtime LLM switching.
...
- Make it so that tools in `LLMContext` are guaranteed to be either a `ToolsSchema` or `NOT_GIVEN`
2025-08-26 09:44:15 -04:00
Paul Kompfner
1f7e8e001b
[WIP] Universal (LLM-agnostic) context machinery to support runtime LLM switching.
...
- Update some types to also allow for universal `LLMContext`
2025-08-26 09:44:15 -04:00
Paul Kompfner
688b136141
[WIP] Universal (LLM-agnostic) context machinery to support runtime LLM switching.
...
- Add to Google LLM service support for universal LLM context
2025-08-26 09:44:15 -04:00
Paul Kompfner
809c4c1bc5
[WIP] Universal (LLM-agnostic) context machinery to support runtime LLM switching.
...
- Add to OpenAI LLM service support for universal LLM context
2025-08-26 09:44:15 -04:00
Paul Kompfner
81ca5e6601
[WIP] Universal (LLM-agnostic) context machinery to support runtime LLM switching.
...
- Formatting fix + dead import cleanup
2025-08-26 09:44:15 -04:00
Paul Kompfner
ebc49d2252
[WIP] Universal (LLM-agnostic) context machinery to support runtime LLM switching.
...
- Add a "universal" alias for `OpenAILLMContextAssistantTimestampFrame`: `LLMContextAssistantTimestampFrame`
2025-08-26 09:44:15 -04:00
Paul Kompfner
ff8d158e18
[WIP] Universal (LLM-agnostic) context machinery to support runtime LLM switching.
...
- Added universal `LLMContext` and associated context aggregators.
2025-08-26 09:44:15 -04:00
Aleix Conchillo Flaqué
37980b0854
Merge pull request #2504 from pipecat-ai/aleix/cartesia-fix-timeout-reconnection
...
CartesiaTTSService: reconnect on Cartesia's timeout
2025-08-25 15:24:31 -07:00
Aleix Conchillo Flaqué
39ebc2c9c1
CartesiaTTSService: reconnect on Cartesia's timeout
2025-08-25 14:09:03 -07:00