Skip to content

Conversation

sinedied
Copy link
Contributor

@sinedied sinedied commented Sep 4, 2023

Note: to be rebased or merged for keeping individual commits as steps (some are useful for feedbacks)

export * from './approach.js';
export * from './ask-retrieve-then-read.js';
export * from './ask-read-retrieve-read.js';
export * from './chat-read-retrieve-read.js';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

certainly confusing file names....Is this a convention?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it's not the best, it's basically "<chat_or_ask_api>-<approach_name>" but confusing for the "ask" ones.
Initially I wanted to put them in their own folders like chat/read-retrieve-read.ts and ask/read-retrieve-read.ts, but then it would be the class names that would be confusing 😅
If you have a better idea... (naming is even worse on the Python sample BTW)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't then (if we do / maybe ApiName be a super class to be extended?

like class Chat {} class ReadRetrieve extends Chat { constructor () { super(); } } 

Or they share no commonalities at all?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They already implement either the ChatApproach or AskApproach interface (in approach.ts) and all derive from BaseApproach class.
But for example it would result in having two ReadRetrieveRead class to be imported in the plugins/approaches.ts file (so we'll have to discriminate anyways), and having identical class name is not good for searchability of the code :/

I'll try to think of something!

@anfibiacreativa anfibiacreativa merged commit 5e3176c into main Sep 6, 2023
@sinedied sinedied deleted the complete-approaches branch September 6, 2023 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants