Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generation.ts to fix TOGETHER/LLAMACLOUD image generation #786

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

ProphetX10
Copy link
Contributor

Relates to:

Risks

Background

For use of LLAMACLOUD/TOGETHER via imageModelProvider: ModelProviderName.TOGETHER the API didn't appear to be correctly implemented.

What does this PR do?

Fixes the implementation of the together api in packages/core/src/generation.ts

What kind of change is this?

Bug fixes (non-breaking change which fixes an issue)

together API call was not fetching the generated image and storing it correctly

Documentation changes needed?

none

Testing

i added " imageModelProvider: ModelProviderName.TOGETHER," to defaultcharacter.ts
added a together API key to the .env file along with openai key

set the following
DISCORD_APPLICATION_ID=
DISCORD_API_TOKEN=
IMAGE_GEN=TRUE
USE_OPENAI_EMBEDDING=TRUE
USE_OLLAMA_EMBEDDING=TRUE

Where should a reviewer start?

  1. .env file keys
  2. add " imageModelProvider: ModelProviderName.TOGETHER," to defaultcharacter.ts
  3. set up discord bot stuff (see online instructions for this) and add to chat room
  4. build & start
  5. test discord agent to gen an image

Detailed testing steps

  1. .env file keys
  2. add " imageModelProvider: ModelProviderName.TOGETHER," to defaultcharacter.ts
  3. set up discord bot stuff (see online instructions for this) and add to chat room
  4. build & start
  5. test discord agent to gen an image

then proceeded to go to discord and asked the agent to generate an image of a cat girl

which resulted in the following in the console log

◎ LOGS
Generating image with prompt:
<@&1303451439787544669> draw me some anime cat girls with black hair and sparkly digital eyes

ℹ INFORMATIONS
Generating image with options:
{"imageModelProvider":"black-forest-labs/FLUX.1-schnell"}

◎ LOGS
Image generation successful, number of images:
1

◎ LOGS
Processing image 1:
generated_1733131072769_0

◎ LOGS
Generated caption for image 1:

@lalalune lalalune merged commit 5d763e0 into elizaOS:main Dec 2, 2024
1 check passed
dsldsl pushed a commit to dsldsl/eliza that referenced this pull request Dec 7, 2024
Update generation.ts to fix TOGETHER/LLAMACLOUD image generation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants