examples: use gpt-4o model by default
This commit is contained in:
@@ -44,7 +44,7 @@ async def main(room_url):
|
|||||||
|
|
||||||
llm = OpenAILLMService(
|
llm = OpenAILLMService(
|
||||||
api_key=os.getenv("OPENAI_API_KEY"),
|
api_key=os.getenv("OPENAI_API_KEY"),
|
||||||
model="gpt-4-turbo-preview")
|
model="gpt-4o")
|
||||||
|
|
||||||
messages = [
|
messages = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ async def main(room_url):
|
|||||||
|
|
||||||
llm = OpenAILLMService(
|
llm = OpenAILLMService(
|
||||||
api_key=os.getenv("OPENAI_API_KEY"),
|
api_key=os.getenv("OPENAI_API_KEY"),
|
||||||
model="gpt-4-turbo-preview")
|
model="gpt-4o")
|
||||||
|
|
||||||
imagegen = FalImageGenService(
|
imagegen = FalImageGenService(
|
||||||
params=FalImageGenService.InputParams(
|
params=FalImageGenService.InputParams(
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ async def main():
|
|||||||
|
|
||||||
llm = OpenAILLMService(
|
llm = OpenAILLMService(
|
||||||
api_key=os.getenv("OPENAI_API_KEY"),
|
api_key=os.getenv("OPENAI_API_KEY"),
|
||||||
model="gpt-4-turbo-preview")
|
model="gpt-4o")
|
||||||
|
|
||||||
tts = ElevenLabsTTSService(
|
tts = ElevenLabsTTSService(
|
||||||
aiohttp_session=session,
|
aiohttp_session=session,
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ async def main(room_url: str, token):
|
|||||||
|
|
||||||
llm = OpenAILLMService(
|
llm = OpenAILLMService(
|
||||||
api_key=os.getenv("OPENAI_API_KEY"),
|
api_key=os.getenv("OPENAI_API_KEY"),
|
||||||
model="gpt-4-turbo-preview")
|
model="gpt-4o")
|
||||||
|
|
||||||
messages = [
|
messages = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ async def main(room_url: str, token):
|
|||||||
|
|
||||||
llm = OpenAILLMService(
|
llm = OpenAILLMService(
|
||||||
api_key=os.getenv("OPENAI_API_KEY"),
|
api_key=os.getenv("OPENAI_API_KEY"),
|
||||||
model="gpt-4-turbo-preview")
|
model="gpt-4o")
|
||||||
|
|
||||||
messages = [
|
messages = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ async def main(room_url: str, token):
|
|||||||
|
|
||||||
llm = OpenAILLMService(
|
llm = OpenAILLMService(
|
||||||
api_key=os.getenv("OPENAI_API_KEY"),
|
api_key=os.getenv("OPENAI_API_KEY"),
|
||||||
model="gpt-4-turbo-preview")
|
model="gpt-4o")
|
||||||
|
|
||||||
messages = [
|
messages = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ async def main(room_url: str, token):
|
|||||||
|
|
||||||
llm = OpenAILLMService(
|
llm = OpenAILLMService(
|
||||||
api_key=os.getenv("OPENAI_API_KEY"),
|
api_key=os.getenv("OPENAI_API_KEY"),
|
||||||
model="gpt-4-turbo-preview")
|
model="gpt-4o")
|
||||||
|
|
||||||
tts = ElevenLabsTTSService(
|
tts = ElevenLabsTTSService(
|
||||||
aiohttp_session=session,
|
aiohttp_session=session,
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ async def main(room_url: str, token):
|
|||||||
|
|
||||||
llm = OpenAILLMService(
|
llm = OpenAILLMService(
|
||||||
api_key=os.getenv("OPENAI_API_KEY"),
|
api_key=os.getenv("OPENAI_API_KEY"),
|
||||||
model="gpt-4-turbo-preview")
|
model="gpt-4o")
|
||||||
llm.register_function(
|
llm.register_function(
|
||||||
"get_current_weather",
|
"get_current_weather",
|
||||||
fetch_weather_from_api,
|
fetch_weather_from_api,
|
||||||
|
|||||||
@@ -92,8 +92,8 @@
|
|||||||
const audioArray = new Uint8Array(audioVector);
|
const audioArray = new Uint8Array(audioVector);
|
||||||
|
|
||||||
audioContext.decodeAudioData(audioArray.buffer, function(buffer) {
|
audioContext.decodeAudioData(audioArray.buffer, function(buffer) {
|
||||||
const source = new AudioBufferSourceNode(audioContext);
|
const source = new AudioBufferSourceNode(audioContext);
|
||||||
source.buffer = buffer;
|
source.buffer = buffer;
|
||||||
source.start(playTime);
|
source.start(playTime);
|
||||||
source.connect(audioContext.destination);
|
source.connect(audioContext.destination);
|
||||||
playTime = playTime + buffer.duration;
|
playTime = playTime + buffer.duration;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ from dotenv import load_dotenv
|
|||||||
load_dotenv(override=True)
|
load_dotenv(override=True)
|
||||||
|
|
||||||
logger.remove(0)
|
logger.remove(0)
|
||||||
logger.add(sys.stderr, level="TRACE")
|
logger.add(sys.stderr, level="DEBUG")
|
||||||
|
|
||||||
|
|
||||||
async def main():
|
async def main():
|
||||||
@@ -37,7 +37,7 @@ async def main():
|
|||||||
|
|
||||||
llm = OpenAILLMService(
|
llm = OpenAILLMService(
|
||||||
api_key=os.getenv("OPENAI_API_KEY"),
|
api_key=os.getenv("OPENAI_API_KEY"),
|
||||||
model="gpt-4-turbo-preview")
|
model="gpt-4o")
|
||||||
|
|
||||||
stt = WhisperSTTService()
|
stt = WhisperSTTService()
|
||||||
|
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ async def main(room_url: str, token):
|
|||||||
|
|
||||||
llm = OpenAILLMService(
|
llm = OpenAILLMService(
|
||||||
api_key=os.getenv("OPENAI_API_KEY"),
|
api_key=os.getenv("OPENAI_API_KEY"),
|
||||||
model="gpt-4-turbo-preview")
|
model="gpt-4o")
|
||||||
|
|
||||||
ta = TalkingAnimation()
|
ta = TalkingAnimation()
|
||||||
|
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ async def main(room_url: str, token):
|
|||||||
|
|
||||||
llm = OpenAILLMService(
|
llm = OpenAILLMService(
|
||||||
api_key=os.getenv("OPENAI_API_KEY"),
|
api_key=os.getenv("OPENAI_API_KEY"),
|
||||||
model="gpt-4-turbo-preview")
|
model="gpt-4o")
|
||||||
|
|
||||||
messages = [
|
messages = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ async def main(room_url, token=None):
|
|||||||
|
|
||||||
llm_service = OpenAILLMService(
|
llm_service = OpenAILLMService(
|
||||||
api_key=os.getenv("OPENAI_API_KEY"),
|
api_key=os.getenv("OPENAI_API_KEY"),
|
||||||
model="gpt-4-turbo"
|
model="gpt-4o"
|
||||||
)
|
)
|
||||||
|
|
||||||
tts_service = ElevenLabsTTSService(
|
tts_service = ElevenLabsTTSService(
|
||||||
|
|||||||
@@ -97,7 +97,8 @@ async def main(room_url: str, token):
|
|||||||
)
|
)
|
||||||
|
|
||||||
llm = OpenAILLMService(
|
llm = OpenAILLMService(
|
||||||
api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4-turbo-preview"
|
api_key=os.getenv("OPENAI_API_KEY"),
|
||||||
|
model="gpt-4o"
|
||||||
)
|
)
|
||||||
|
|
||||||
sa = SentenceAggregator()
|
sa = SentenceAggregator()
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ class BaseOpenAILLMService(LLMService):
|
|||||||
|
|
||||||
class OpenAILLMService(BaseOpenAILLMService):
|
class OpenAILLMService(BaseOpenAILLMService):
|
||||||
|
|
||||||
def __init__(self, model="gpt-4", **kwargs):
|
def __init__(self, model="gpt-4o", **kwargs):
|
||||||
super().__init__(model, **kwargs)
|
super().__init__(model, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user