generated from langchain-ai/new-langgraphjs-project
-
Notifications
You must be signed in to change notification settings - Fork 282
Open
Description
We should modify the post state field to match the complex post type, or improve it to include images.
Now that we have two fields, one for post and complexPost, it's time to refactor into one single post interface which can handle single posts, threads, threads with images, etc.
This new state field should be an array of objects, something like this:
(Image is already defined here, reuse and move [ComplexPost](https://github.com/langchain-ai/social-media-agent/blob/main/src/agents/shared/nodes/generate-post/types.ts#L6) to this shared types.ts file.
export type Image = { imageUrl: string; mimeType: string };
export interface ComplexPost2 {
/**
* The index the post should be in the series.
*/
index: number;
/**
* The text content of the post.
*/
text: string;
/**
* The image which will be attached to the post.
*/
image?: Image;
}The logic for LinkedIn should be as follows, as we do not want to post threads there:
- join all post
textfields into a single string - use only the image from the first post
Metadata
Metadata
Assignees
Labels
No labels