Skip to content

Commit

Permalink
Merge pull request #384 from meemproject/feature/openai
Browse files Browse the repository at this point in the history
bulkburn fix
  • Loading branch information
kengoldfarb authored Apr 7, 2023
2 parents e7a116a + 0da054c commit 3e265a0
Show file tree
Hide file tree
Showing 4 changed files with 188 additions and 183 deletions.
2 changes: 1 addition & 1 deletion src/controllers/AgreementController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ export default class AgreementController {
}),
orm.models.AgreementToken.findAll({
where: {
id: {
tokenId: {
[Op.in]: req.body.tokenIds
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/lib/gptPrompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ export const prompt2 = (options: { brandName: string; brandVoice: string }) => {

return `You are a content curator. You will be ingesting messages from the chat rooms of the ${brandName} community. You will then analyze the messages for the best content. You should consider the emoji reactions for each message as well as surrounding context and discussion. Finally, you should summarize the best content and links into a newsletter format where the writer's voice can be described as: ${brandVoice}`
}

export const compressor = (options: { text: string }) => {
const { text } = options
return `Compressor: compress the following text in a way that fits in a tweet (ideally) and such that you (GPT-4) can reconstruct the intention of the human who wrote text as close as possible to the original intention. This is for yourself. It does not need to be human readable or understandable. Abuse of language mixing, abbreviations, symbols (unicode and emoji), or any other encodings or internal representations is all permissible, as long as it, if pasted in a new inference cycle, will yield near-identical results as the original text: ${text}`
}
196 changes: 98 additions & 98 deletions src/types/meem.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2139,6 +2139,90 @@ export namespace GetDiscordServers {



export namespace GetJoinGuildMessage {
export interface IPathParams {
/** The Agreement id */
agreementId: string
}

export const path = (options: IPathParams) =>
`/api/1.0/agreements/${options.agreementId}/getJoinGuildMessage`

export const method = HttpMethod.Get

export interface IQueryParams {}

export interface IRequestBody {}

export interface IResponseBody extends IApiResponseBody {
message: string
params: {
chainId?: string
msg: string
method: number
addr: string
nonce: string
hash?: string
ts: string
}
}

export interface IDefinition {
pathParams: IPathParams
queryParams: IQueryParams
requestBody: IRequestBody
responseBody: IResponseBody
}

export type Response = IResponseBody | IError
}



export namespace JoinGuild {
export interface IPathParams {
/** The Agreement id */
agreementId: string
}

export const path = (options: IPathParams) =>
`/api/1.0/agreements/${options.agreementId}/joinGuild`

export const method = HttpMethod.Post

export interface IQueryParams {}

export interface IRequestBody {
message: string
params: {
chainId?: string
msg: string
method: number
addr: string
nonce: string
hash?: string
ts: string
}
sig: string
mintToken?: boolean
}

export interface IResponseBody extends IApiResponseBody {
status: 'success'
}

export interface IDefinition {
pathParams: IPathParams
queryParams: IQueryParams
requestBody: IRequestBody
responseBody: IResponseBody
}

export type Response = IResponseBody | IError
}



export namespace CreateBundle {
export interface IPathParams {}

Expand Down Expand Up @@ -2341,76 +2425,27 @@ export namespace UpdateWalletContractInstance {



export namespace GetJoinGuildMessage {
export interface IPathParams {
/** The Agreement id */
agreementId: string
}

export const path = (options: IPathParams) =>
`/api/1.0/agreements/${options.agreementId}/getJoinGuildMessage`

export const method = HttpMethod.Get

export interface IQueryParams {}

export interface IRequestBody {}

export interface IResponseBody extends IApiResponseBody {
message: string
params: {
chainId?: string
msg: string
method: number
addr: string
nonce: string
hash?: string
ts: string
}
}

export interface IDefinition {
pathParams: IPathParams
queryParams: IQueryParams
requestBody: IRequestBody
responseBody: IResponseBody
}

export type Response = IResponseBody | IError
}



export namespace JoinGuild {
export interface IPathParams {
/** The Agreement id */
agreementId: string
}
/** Save some data to IPFS */
export namespace SaveToIPFS {
export interface IPathParams {}

export const path = (options: IPathParams) =>
`/api/1.0/agreements/${options.agreementId}/joinGuild`
export const path = () => `/api/1.0/ipfs`

export const method = HttpMethod.Post

export interface IQueryParams {}

export interface IRequestBody {
message: string
params: {
chainId?: string
msg: string
method: number
addr: string
nonce: string
hash?: string
ts: string
}
sig: string
mintToken?: boolean
/** The data to save. Only one of "data" or "json" should be sent */
data?: string

/** The JSON to save. Only one of "data" or "json" should be sent */
json?: Record<string, any>
}

export interface IResponseBody extends IApiResponseBody {
status: 'success'
/** The IPFS hash for the saved data */
ipfsHash: string
}

export interface IDefinition {
Expand All @@ -2423,6 +2458,9 @@ export namespace JoinGuild {
export type Response = IResponseBody | IError
}

// TODO: How to specify json in OpenAPI definition




/** Create or update the current user */
Expand Down Expand Up @@ -2624,44 +2662,6 @@ export namespace UpdateUserIdentity {



/** Save some data to IPFS */
export namespace SaveToIPFS {
export interface IPathParams {}

export const path = () => `/api/1.0/ipfs`

export const method = HttpMethod.Post

export interface IQueryParams {}

export interface IRequestBody {
/** The data to save. Only one of "data" or "json" should be sent */
data?: string

/** The JSON to save. Only one of "data" or "json" should be sent */
json?: Record<string, any>
}

export interface IResponseBody extends IApiResponseBody {
/** The IPFS hash for the saved data */
ipfsHash: string
}

export interface IDefinition {
pathParams: IPathParams
queryParams: IQueryParams
requestBody: IRequestBody
responseBody: IResponseBody
}

export type Response = IResponseBody | IError
}

// TODO: How to specify json in OpenAPI definition




/** Redirect the user to this endpoint to authenticate w/ slack */
export namespace AuthenticateWithSlack {
export interface IPathParams {}
Expand Down
Loading

0 comments on commit 3e265a0

Please sign in to comment.