openai usage llms models

Former-commit-id: d89c940bd3
discord-bot-framework
Kye 1 year ago
parent 4c2ec18731
commit 9429c33c6d

@ -46,7 +46,7 @@ We have a small gallery of examples to run here, [for more check out the docs to
```python
from swarms.workers import Worker
from swarms.swarms import MultiAgentDebate, select_speaker
from langchain.llms import OpenAIChat
from swarms.models import OpenAIChat
llm = OpenAIChat(
model_name='gpt-4',
@ -107,7 +107,7 @@ for result in results:
- And, then place the openai api key in the Worker for the openai embedding model
```python
from langchain.llms import ChatOpenAI
from swarms.models import ChatOpenAI
from swarms.workers import Worker
llm = ChatOpenAI(
@ -139,7 +139,7 @@ print(response)
- OmniModal Agent is an LLM that access to 10+ multi-modal encoders and diffusers! It can generate images, videos, speech, music and so much more, get started with:
```python
from langchain.llms import OpenAIChat
from swarms.models import OpenAIChat
from swarms.agents import OmniModalAgent

@ -1,5 +1,5 @@
from discord.ext import commands
from langchain.llms import OpenAIChat
from swarms.models import OpenAIChat
from swarms.agents import OmniModalAgent
# Setup

@ -4,7 +4,7 @@ import threading
import os
import glob
import base64
from langchain.llms import OpenAIChat
from swarms.models import OpenAIChat
from swarms.agents import OmniModalAgent

@ -1,15 +1,15 @@
from langchain.llms import OpenAIChat
from swarms.models import OpenAIChat
from swarms import Worker
llm = OpenAIChat(
openai_api_key="",
openai_api_key="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",
temperature=0.5,
)
node = Worker(
llm=llm,
ai_name="Optimus Prime",
openai_api_key="",
openai_api_key="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",
ai_role="Worker in a swarm",
external_tools=None,
human_in_the_loop=False,

@ -1,6 +1,6 @@
from swarms.workers import Worker
from swarms.agents.meta_prompter import MetaPrompterAgent
from langchain.llms import OpenAI
from swarms.models import OpenAI
# init llm
llm = OpenAI()

@ -1,4 +1,4 @@
from langchain.llms import OpenAIChat
from swarms.models import OpenAIChat
from swarms.agents import OmniModalAgent

@ -1,5 +1,5 @@
from swarms.structs.workflow import Workflow, StringTask
from langchain.llms import OpenAIChat
from swarms.models import OpenAIChat
llm = OpenAIChat()

@ -1,6 +1,6 @@
from swarms.swarms import DialogueSimulator
from swarms.workers.worker import Worker
from langchain.llms import OpenAIChat
from swarms.models import OpenAIChat
llm = OpenAIChat(model_name="gpt-4", openai_api_key="api-key", temperature=0.5)

@ -1,4 +1,4 @@
from langchain.llms import OpenAIChat
from swarms.models import OpenAIChat
from swarms.swarms import GroupChat, GroupChatManager
from swarms.workers import Worker

@ -1,6 +1,6 @@
from swarms.swarms.multi_agent_debate import MultiAgentDebate, select_speaker
from swarms.workers.worker import Worker
from langchain.llms import OpenAIChat
from swarms.models import OpenAIChat
llm = OpenAIChat()

@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "swarms"
version = "1.7.9"
version = "1.8.0"
description = "Swarms - Pytorch"
license = "MIT"
authors = ["Kye Gomez <kye@apac.ai>"]

Loading…
Cancel
Save